try ( quot -- )
Factor handbook » The language » Exception handling » The debugger

Prev:print-error ( error -- )
Next:error. ( error -- )


Vocabulary
debugger

Inputs
quota quotation


Outputs
None

Word description
Attempts to call a quotation; if it throws an error, the error is printed to output-stream, stacks are restored, and execution continues after the call to try.

Examples
The following example prints an error and keeps going:
[ "error" throw ] try "still running..." print

The listener uses try to recover from user errors.

Definition