recover ( ..a try: ( ..a -- ..b ) recovery: ( ..a error -- ..b ) -- ..b )
Factor handbook > The language > Exception handling

Prev:cleanup ( try cleanup-always cleanup-error -- )
Next:ignore-errors ( quot -- )


Vocabulary
continuations

Inputs and outputs
trya quotation with stack effect ( ..a -- ..b )
recoverya quotation with stack effect ( ..a error -- ..b )


Word description
Calls the try quotation. If an exception is thrown in the dynamic extent of the try quotation, restores the data stack and calls the recovery quotation to handle the error.

See also
cleanup

Definition