5.1.11 Handler Completion and Return Value

When an exception handler has finished all its processing, it completes by performing one of the following actions:

Completion by Reraise

If an exception handler determines that additional handlers should be invoked for the exception (because it could not completely handle the exception), it can reraise the exception by returning ExceptionContinueSearch.

Reraise causes the next exception handler.

If all exception handlers established by the thread reraise the exception, the system last-chance handler is invoked, with system dependent results.

Completion by Continue

By returning ExceptionContinueExecution, an exception handler can continue execution of the thread at the address specified by the continuation PC in the ContextRecord, with the context of the interrupted procedure restored.

If ExceptionContinueExecution is returned and the EXCEPTION_NONCONTINUABLE flag is 1, then a nested exception is raised with ExceptionCode = STATUS_NONCONTINUABLE_EXCEPTION. This second exception is also noncontinuable.

Continuation from Unwind

When an unwind is in progress, the status returned by handlers must be ExceptionContinueSearch; otherwise STATUS_INVALID_DISPOSITION is raised. That is, handlers may not continue during an unwind operation.

Continuation from Signal Exceptions

The legality and effects of continuation from a signal exception are governed by the underlying signal, as specified by the implementation of the POSIX environment.

Completion by Unwinding

The unwind type of completion is more complex than simply returning a value. See Section 5.2, Unwinding, for details and considerations on unwinding.