The condition step begins after the enablement step has completed
and
Language Environment determines
that an exception in your application should be handled as a condition.
In the simplest form of this step,
Language Environment traverses
the stack beginning with the stack frame for the routine in which
the condition occurred and progresses towards earlier stack frames.
Throughout the following discussion, refer to
Figure 1.
Figure 1. Condition processing
- Language Environment condition
handling begins at the most recently activated stack frame. This is
the stack frame associated with the routine that incurred the condition.
In Figure 1, this is A, or routine
4.
- Language Environment traverses
the stack, stack frame by stack frame, towards earlier stack frames.
This is in the direction of arrow B in Figure 1. C/C++ signal
handlers or C++ catch clauses
can all respond by percolating or handling the condition (see Responses to conditions for a discussion of these actions).
- Condition handling is complete if one of the handlers requests
the application to resume execution. If all stack frames have been
visited, and no condition handler has requested a resume, the language
of the routine in which the exception occurred can enforce default
condition handling semantics.
- Language Environment default
actions are then taken based on the severity of the unhandled condition,
as indicated in Table 1.
Table 1. Language Environment default
responses to unhandled conditions. Language Environment's default
responses to unhandled conditions fall into one of two types, depending
on whether the condition was signaled using CEESGL and an fc parameter,
or the condition came from any other source.Severity of condition |
Condition came from any other source |
---|
0 (Informative message) |
Resume without issuing message. |
1 (Warning Message) |
Resume without issuing message. |
2 (Program terminated in error) |
Terminate the thread. Message issued if TERMTHDACT(MSG) is
specified. |
3 (Program terminated in severe error) |
Terminate the thread. Message issued if TERMTHDACT(MSG) is
specified. |
4 (Program terminated in critical error) |
Terminate the thread. Message issued if TERMTHDACT(MSG) is
specified. |