Product SiteDocumentation Site

11.3. Condition Information

When a condition is trapped and causes a SIGNAL or CALL, this becomes the current trapped condition, and certain condition information associated with it is recorded. You can inspect this information by using the CONDITION built-in function (see Section 7.4.18, “CONDITION”).
The condition information includes:
The current condition information is replaced when control is passed to a label as the result of a condition trap (CALL ON or SIGNAL ON). Condition information is saved and restored across subroutine or function calls, including one because of a CALL ON trap and across method invocations. Therefore, a routine called by CALL ON can access the appropriate condition information. Any previous condition information is still available after the routine returns.

11.3.1. Descriptive Strings

The descriptive string varies, depending on the condition trapped:
ERROR
The string that was processed and resulted in the error condition.
FAILURE
The string that was processed and resulted in the failure condition.
HALT
Any string associated with the halt request. This can be the null string if no string was provided.
LOSTDIGITS
The number with excessive digits that caused the LOSTDIGITS condition.
NOMETHOD
The name of the method that could not be found.
NOSTRING
The readable string representation of the object causing the NOSTRING condition.
NOTREADY
The name of the stream being manipulated when the error occurred and the NOTREADY condition was raised. If the stream was a default stream with no defined name, then the null string might be returned.
NOVALUE
The derived name of the variable whose attempted reference caused the NOVALUE condition.
SYNTAX
Any string the language processor associated with the error. This can be the null string if you did not provide a specific string. Note that the special variables RC and SIGL provide information on the nature and position of the processing error. You can enable the SYNTAX condition trap only by using SIGNAL ON.
USER
Any string specified by the DESCRIPTION option of the RAISE instruction that raised the condition. If a description string was not specified, a null string is used.