[CATCH [BEFORE UNWIND] cx_class1 cx_class2 ... [INTO oref].
[CLEANUP [INTO oref].
TRY introduces a control structure with multiple statement
blocks. The first statement block
try_block is always executed, whereas a branching off to exactly one of the remaining statement blocks only occurs if a
class-based exception is raised in
TRY control structure defines the following statement blocks:
try_blockdirectly after the statement
TRYblock defines a protected area whose class-based exceptions can be handled in the subsequent
CATCHblocks. If no exception is raised in the
TRYblock and it reaches its end, the system resumes processing after
ENDTRY. If a class-based exception is raised in the
TRYblock, the system searches for an exception handler in the same
TRYcontrol structure or in an external structure (see System Behavior).
One or more optional
catch_blockfor handling exceptions, each directly after a
CATCHstatement. If the end of a
CATCHblock is reached without it being left early, the processing continues after the
cleanup_blockfor cleanups directly after the
All statement blocks of a
TRYcontrol structure can contain any kind of control structures, in particular further
No exceptions (except those in category CX_NO_CHECK from event handlers) can be propagated from the
static constructors and
event handlers, which means they must always be handled locally.