If a TRY statement is used in a block that declares an EXCEPTION procedure, the system invokes the EXCEPTION procedure only if the TRY statement does not handle the condition.
If a block contains an EPILOG procedure, then the system invokes the EPILOG procedure at block exit, regardless of whether or not any termination conditions occurred, and regardless of whether or not such conditions were handled by other mechanisms.
While a TRY statement is in effect, a process might enter one or more procedures. If an error occurs, the system deletes the activation records for all procedures entered since the TRY statement. Any of these activation records might include an EXCEPTION procedure or an EPILOG procedure. Before deleting each activation record, the system executes any EXCEPTION or EPILOG procedures contained in that activation record. For example, if the process in TRY Statement, EPILOG Procedure, and EXCEPTION Procedure incurs a termination condition, the system executes the EPILOG procedure in PROCD, then the EXCEPTION procedure in PROCC, and then the TRY statement in PROCB.
The system skips executing TRY error-handling code if an EXCEPTION or EPILOG procedure returns control to a point before the TRY statement. For example, in TRY Statements and Bad GO TO Statements, the EXCEPTION procedure in PROCC invokes procedure PROCE. Procedure PROCE, in turn, executes a bad GO TO statement that transfers control to PROCA. Therefore, the TRY statement in PROCB is never executed.



