Errors occurring in high level routines such as histogram drawing, shading etc, are serviced by the two routines XERROR and ZERROR. Errors occurring in the basic SPROGS system are dealt with by the routine ERROR. Both systems allow the printing of arguments pertaining to the error.
The COMMON block
COMMON/SPRG4/ERR(6,2)
is used to pass arguments to the error routines for printing. ERR(1,1) is a count of the number of arguments, and is reset to 0 after each error routine call. ERR(1,2) is currently unused. Arguments are passed across in ERR(*,1), and the corresponding ERR (*,2) contains a marker indicating the type of argument. Current type settings are
0 real number 1 packed text
The type marks are reset to 0 after each error call.
The routine
XERROR(N)
prints the error number, message (if any) and arguments, and will then RETURN. It is called for recoverable errors.
The routine
ZERROR(N)
acts as XERROR, except routine FINIS is called. This routine will tidy any output devices and then STOP EE, but the routine may be replaced by a user to trap his own catastrophic errors.
The routine
ERROR (N)
prints the error number, message (if any) and arguments. If N is negative, it will RETURN. Otherwise it will STOP EE after closing output streams. Fatal errors in basic SPROGS may not be trapped by a user.