Make your own free website on
4.2.7 The Current Trapped Condition
The interpreter maintains a data structure called the current
trapped condition. It contains information relating the most
recent condition trapped on this or higher procedure level. The
current trapped condition is normally inherited by subroutines and
functions, and restored after return from these.

    When trapped by method SIGNAL the current trapped condition
  of the current procedure level is set to information describing
  the condition trapped.

    When trapped by method CALL, the current trapped condition at
  the procedure level which the trap occurred at, is not changed.
  Instead, the current trapped condition in the condition handler is
  set to information describing the condition.

The information stored in the current trapped condition can be
retrieved by the built-in function CONDITION(). The syntax format
of this function is:


where option is an option string of which only the first character
matters.  The valid options are: Condition name, Description,
Instruction and State. These will return: the name of the current
trapped condition; the descriptive text; the method; and the
current state of the condition, respectively. The default option
is Instruction. See the documentation on the built-in functions.
See also the description of each condition below.

Note that the State option do not return the state at the time
when the condition was raised or the trap was triggered. It
returns the current state of the trap, and may change during
execution.  The other information in the current trapped condition
may only change when a new condition is trapped at return from