ERRACT

Synopsis
ERRACT
Description

ERRACT is an instructionlist that is run whenever an error is thrown and there is no CATCH tag for "ERROR. ERRACT typically has the value [PAUSE] to allow interactive debugging.

Some errors may be recoverable if ERRACT can fix the problem. For example, many bad input errors (such as running FORWARD [1]) are recoverable. If a bad input error causes ERRACT to be run, then the output of ERRACT will be used instead of the bad input that caused the error. If ERRACT outputs another datum of bad input, then it will be run again to fix the new problem.

Example
FENCE
FORWARD 1000
Turtle out of bounds

MAKE "ERRACT [PRINT [You really blew it]]
FORWARD 1000
You really blew it

SourceForge.net Logo