ERROR

Synopsis
ERROR
Description

Outputs a list describing the error just caught, if any. If no error was caught since the last use of ERROR, then ERROR outputs the empty list. The error list contains four members: an integer code corresponding to the type of error, the text of the error message, the name of the procedure in which the error occurred, and the instruction line on which the error occurred.

The meaning of the first item in the list is explained in the section on Error Codes.

Example
TO MYPROGRAM
  FORWARD 1000
END

FENCE
CATCH "ERROR [MYPROGRAM]
SHOW ERROR
[3 turtle out of bounds MYPROGRAM [FORWARD 1000]]
SHOW ERROR
[]

SourceForge.net Logo