(Contents)(Previous)(Next)

Catching Runtime Errors (TRY-CATCH)

The TRY CATCH statement allows runtime errors to be handled without interruption of the current program.

If a runtime error or a STOP statement occurs in the TRY part of the statement, the program branches, with the corresponding error number, to the CATCH part of the statement. If one of the selectors corresponds to the error number, the corresponding statement is executed and the program execution is continued after the CATCH statement. Otherwise, the error remains set. The selectors can be specified as in a CASE statement, but an OTHERWISE branch is not possible.

Example:

Syntax:


(Contents)(Previous)(Next)