Dynamic Semantics<2> (GNAT Reference Manual) (original) (raw)


17.3.11.3 Dynamic Semantics

Statements in the optional sequence_of_statements contained in the finally branch will be executed unconditionally, after the main sequence_of_statements is executed, and after any potential exception_handler is executed.

If an exception is raised in the finally part, it cannot be caught by the exception_handler.

Abort/ATC (asynchronous transfer of control) cannot interrupt a finally block, nor prevent its execution, that is the finally block must be executed in full even if the containing task is aborted, or if the control is transferred out of the block.