EasyManuals Logo
Home>HP>Software>TACL

HP TACL User Manual

HP TACL
235 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #86 background imageLoading...
Page #86 background image
Writing an Exception Handler
Developing TACL Routines
3–30 107365 Tandem Computers Incorporated
Figure 3-16. Sample Command Shell (Page 4 of 4)
?SECTION exit MACRO == EXIT the exception handler
[#IF condition = 1 |THEN|
#OUTPUT Can not EXIT without resolving the error.
#OUTPUT Must WARMSTART, COLDSTART, or SHUTDOWN.
#OUTPUT
|ELSE|
#OUTPUT Exiting restrictive command shell.
#RAISE EXIT
]
?SECTION cleanup MACRO == delete variables from prev. errors
#SET #BREAKMODE DISABLE
#OUTPUT Performing cleanup procedure
#OUTPUT The Break Key is disabled until cleanup is complete.
[#CASE [name][step]
| WARMSTART1 |
#POP a b
| WARMSTART2 |
#POP a b c d
| COLDSTART1 |
#POP e f
| SHUTDOWN1 |
#POP g h
]
#OUTPUT
#DELAY 200
#SETMANY condition recovery , 0 OFF
#SET #BREAKMODE ENABLE
#OUTPUT Cleanup procedure complete.
Combining Keep and
Release Handlers
The routines in Figure 3-17 show one way to combine a keep handler
(restricted_caller) and a release handler (protected_code).
Restricted_caller starts first; therefore, if an exception occurs, control returns to
the processing loop after the exception is processed.
When the user enters a valid command, restricted_caller calls
protected_code to execute the command; that routine, in turn, calls either do_add
or do_sub. If the user presses the BREAK key or an unknown exception is raised
during execution of either of the latter routines, TACL pops the routine and reinvokes
protected_code. The #CASE function takes the OTHERWISE path, which
performs an orderly deallocation of resources and then raises the same exception.
TACL then pops that routine (the #FILTER function has not yet been executed in the
reinvocation) and returns to restricted_caller. The #CASE function in that
routine takes the appropriate path to deal with the exception and restarts the
processing loop.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP TACL and is the answer not in the manual?

HP TACL Specifications

General IconGeneral
BrandHP
ModelTACL
CategorySoftware
LanguageEnglish

Related product manuals