Download PDF Part I

Transcript
Condition-Handling Routines and Services
9.9 Types of Condition Handlers
9.9.2 Interaction Between Default and User-Supplied Handlers
Several results are possible after a routine signals, depending on a number of
factors, such as the severity of the error, the method of generating the signal, and
the action of the condition handlers you have defined and the default handlers.
Given the severity of the condition and the method of signaling, Figure 9–12
lists all combinations of interaction between user condition handlers and default
condition handlers.
Figure 9–12 Interaction Between Handlers and Default Handlers
Severity
of
Condition
User
Handler
Specifies
CONTINUE
User
Handler
Specifies
UNWIND
Default
Handler
Gets
Control
No Handler
Found
(Bad Stack)
Exception Condition Is Signaled by a Call to LIB$SIGNAL or
Detected by Hardware
WARNING,
INFO, or
ERROR
SEVERE
RETURN
RETURN
UNWIND
UNWIND
Issue
Condition
Message
Call Last−
Chance
Handler
RETURN
EXIT
Issue
Condition
Message
Call Last−
Chance
Handler
EXIT
EXIT
Exception Condition Is Signaled by a Call to LIB$STOP
LIB$STOP
Forces
Severity
to
SEVERE
Message:
"Attempt to
continue
from stop"
EXIT
UNWIND
Issue
Condition
Message
Call Last−
Chance
Handler
EXIT
EXIT
ZK−4257−GE
9–44 Condition-Handling Routines and Services