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

TRY-EXCEPT Statement

The TRY-EXCEPT statement guards statements between TRY and EXCEPT with the exception handlers between EXCEPT and END. An exception raised by a guarded-statement is handled by action-statement which has a matching handler for the exception raised, or by ELSE statements, if present. If an exception is caught, execution continues with the statement following the END, otherwise the exception is passed on to the enclosing scope.

Note: The else clause of a TRY-EXCEPT statement may catch a RETURN or an EXIT, as they are defined as internal exceptions.


Example


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