Go to the first, previous, next, last section, table of contents.

TRY-FINALLY Statement

TRY
  <guarded stmts>
FINALLY
  <cleanup stmts>
END

When an exception occurs in a <guarded stmt>, control is transferred to <cleanup stmts>, and when they have completed, the exception is re-raised. Thus, the TRY-FINALLY statement does not trap exceptions as TRY-EXCEPT does; it merely allows some "cleaning up" before the exception is passed up to be handled by a TRY-EXCEPT statement in a calling routine.

NOTE: The TRY-FINALLY statement catches internal exceptions raised by all EXIT and RETURN statements.


Go to the first, previous, next, last section, table of contents.