Writing an Exception Handler
Developing TACL Routines
3–32
107365 Tandem Computers Incorporated
Figure 3-17. Using Nested Keep and Release Handlers (Page 2 of 2)
?SECTION protected_code ROUTINE
[#CASE [#EXCEPTION]
|_CALL |
== No action required when first called
|OTHERWISE|
#RESET FRAMES RESULTS == Deallocate resources
#RAISE [#EXCEPTION] == Return to caller with
== exception raised, so that
== the caller executes its
== exception handler
] == End CASE
#FILTER [exceptionlist]
[#REST] == Invoke rest of arguments (call macro)
?SECTION do_add ROUTINE
#OUTPUT Adding
?SECTION do_sub ROUTINE
#OUTPUT Subtracting