System Debug employs an error stack for error messages and maintains the
environment variable ERROR for detection of errors by control commands. When an internal error is detected, appropriate error messages are pushed onto the error stack and the variable ERROR is set to the error number of the last error generated.
While the highest-level error messages are typically displayed on the user's
terminal, lower-level (intermediate) errors are usually pushed silently onto
the error stack. All errors can be inspected
with the ERRLIST command:
$nmdebug > dv 1234.98127345
$ VIRT 1234.98127344 $
Display error. Check ERRLIST for details. (error #3800)
$nmdebug > errl
$1: Display error. Check ERRLIST for details. (error # 3800)
$1: data read access error (error #805)
$1: READ_CMWORD bad address: $ VIRT 1234.98127344
$1: Virtual read failed (error #6000)
$1: VADDR= 1234.98127344
$1: A pointer was referenced which contained a virtual address outside
of the bounds of an object.
$nmdebug >
|
The error stack can be reset (cleared) with the ERRDEL command:
The System Debug command interpreter (CI) checks the variable ERROR after each command
is executed. When an error condition is detected (ERROR < 0), all
pending commands (in loops, command lists, macros, and so on) are aborted.
The command stack is flushed, and the outermost prompt is issued.
Note that only negative ERROR values constitute an error. Positive
values represent warnings, and do not cause command stack
execution to cease.
The IGNORE command protects the next single command, command list,
macro, or use file
from being aborted if an error is detected.
IGNORE has the same effect as the CONTINUE command of the
MPE XL CI.
Although the IGNORE command prevents abnormal command termination,
it does not automatically prevent generated errors from being displayed.
The QUIET option of the IGNORE command suppresses the error messages
as well.
While the IGNORE command affects just the following command or command
list, the environment variable AUTOIGNORE may be set to TRUE to cause errors for all commands to be ignored and
is equivalent to entering an IGNORE LOUD command before each one.
User-defined macros can take advantage of the error handling mechanism.
A user error message can be pushed onto the error stack with the ERR
command, and the ERROR variable can be explicitly set to a negative value. For example,
$nmdebug > ERR "a very nasty error happened"
$nmdebug > ENV error -125
|