![]() Previous |
![]() Next |
To correctly handle errors that might occur while you are saving the session environment, place your PUSHLEVEL
statement before the TRAP
statement and your PUSH
statements after the TRAP
statement.
PUSHLEVEL 'firstlevel' TRAP ON error PUSH ...
In the abnormal exit section of your program, place the error label (followed by a colon) and the statements that restore the session environment and handle errors. The abnormal exit section might look like this.
error: POPLEVEL 'firstlevel' OUTFILE EOF
These statements restore saved dimension status and option values and reroute output to the default outfile.