throw ( error -- * )
Factor documentation > Factor handbook > The language > Exception handling
Next:rethrow ( error -- * )


Vocabulary
kernel

Inputs and outputs
erroran object


Word description
Saves the current continuation in the error-continuation global variable and throws an error. Execution does not continue at the point after the throw call. Rather, the innermost catch block is invoked, and execution continues at that point.

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

Definition
IN: kernel

GENERIC: throw ( error -- * )


Methods
USING: combinators.private kernel kernel.private ;

M: object throw
ERROR-HANDLER-QUOT special-object [ die ] or
( error -- * ) call-effect-unsafe ;