ERROR_LINE
Returns the line number for the latest error encountered by TPU. The
value returned by ERROR_LINE is only meaningful inside an error handler.
The value outside of an error handler is indeterminate.
If a procedure was compiled as part of the compilation of a buffer or
range, ERROR_LINE determines the line number by counting from the
beginning of the buffer or range. Therefore, the line number may not be
the same as the line number counting from the beginning of the procedure.
If the procedure was compiled from a string, ERROR_LINE returns the
value 1.
Syntax
integer := ERROR_LINE
Parameters
none
Example
The following code fragment is an error handler that uses ERROR_LINE to
report where the error occurred:
ON_ERROR
MESSAGE (ERROR_TEXT);
MESSAGE ("Error on line " + STR (ERROR_LINE));
RETURN;
ENDON_ERROR;
Related Topics
ERROR ERROR_TEXT MESSAGE_TEXT