RpcFinally
The RpcFinally function specifies termination handlers.
RpcTryFinally
{
guarded statements
}
RpcFinally
{
termination statements
}
RpcEndFinally;
Parameters
-
guarded statements
-
Specifies statements that are executed while exceptions are being monitored. If an exception occurs during the execution of these statements, termination statements will be executed, then unwinding continues to the next RpcTryExcept or RpcTryFinally routine.
-
termination statements
-
Specifies statements that are executed when an exception occurs. After the termination statements are complete, the exception is raised again.
Remarks
The RpcAbnormalTermination function can be used in termination statements to determine whether termination statements is being executed because an exception occurred. A non-zero return from RpcAbnormalTermination indicates that an exception occurred. A value of zero indicates that no exception occurred.
The following restrictions apply:
-
Jumping (via a goto) into guarded statements is not allowed.
-
Jumping (via a goto) into termination statements is not allowed.
-
Returning or jumping (via a goto) from guarded statements is not allowed.
-
Returning or jumping (via a goto) from termination statements is not allowed.
QuickInfo
Windows NT: Yes
Windows CE: Unsupported.
Header: Declared in rpc.h.
See Also
RpcAbnormalTermination