RpcExcept

The RpcExcept function specifies exception handling.

RpcTryExcept 
    { 
    guarded statements 
    }
RpcExcept(expression) 
    { 
    exception statements 
    } 
RpcEndExcept; 

Parameters

guarded statements
Specifies program statements that are guarded or monitored for exceptions during execution.
expression
Specifies an expression that is evaluated when an exception occurs. If expression evaluates to a non-zero value, the exception statements are executed. If expression evaluates to a zero value, unwinding continues to the next RpcTryExcept or RpcTryFinally routine.
exception statements
Specifies statements that are executed when the expression evaluates to a non-zero value.

Remarks

If an exception does not occur, the expression and exception statements are skipped and execution continues at the statement following the RpcEndExcept keyword.

RpcExceptionCode can be used in both expression and exception statements to determine which exception occurred.

The following restrictions apply.

QuickInfo

  Windows NT: Yes
  Windows CE: Unsupported.
  Header: Declared in rpc.h.

See Also

RpcExceptionCode, RpcFinally, RpcRaiseException