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 is used instead of the bad input that caused the error. If ERRACT outputs another datum of bad input, then it is run again to fix the new problem.

Example
FORWARD [1]
FORWARD doesn't like [1] as input

MAKE "ERRACT [PRINT [Doing replacement] 100]
FORWARD [1]
Doing replacement

SourceForge.net Logo