rethrow ( error -- * )
Factor handbook » The language » Exception handling

Prev:throw ( error -- * )
Next:cleanup ( try cleanup-always cleanup-error -- )


Vocabulary
continuations

Inputs
erroran object


Outputs
None

Word description
Throws an error without saving the current continuation in the error-continuation global variable. This is done so that inspecting the error stacks sheds light on the original cause of the exception, rather than the point where it was rethrown.

Notes
This word is intended to be used in conjunction with recover to implement error handlers which perform an action and pass the error to the next outermost error handler.

Examples
The with-lexer word catches errors, annotates them with the current line and column number, and rethrows them:


See also
throw, throw-restarts, rethrow-restarts, throw-continue

Definition