Run-time Error Message Format

To understand the run-time error message format, consider this short program printsum.m:

     SET A=17
GO   SET B=21
     WRITE A+C

When you try to execute this program, the last statement causes an error since the variable C is undefined. If $ETRAP="B", GT.M displays the run-time error message:

$ mumps -run printsum
%GTM-E-UNDEF, Undefined local variable: C
At MUMPS source location GO+1^printsum
GTM>

GT.M informs you of the error (Undefined local variable) and where in the routine the error occurred (GO+1). Note that the run-time system displays the GTM> prompt, indicating that the process has entered Direct Mode. GT.M places run time error information in the intrinsic special variables $ECODE and $ZSTATUS.

Compile-time error messages may appear at run time. This is because errors in indirection and the compile-as-written feature leave errors that are subsequently reported at run time.

The GT.M utilities use portions of the run-time system and therefore may issue run-time errors as well as their own unique errors.