ERROR:
Factor handbook » The language » Exception handling

Prev:ignore-errors ( ... quot: ( ... -- ... ) -- ... )
Next:Restartable errors


Vocabulary
syntax

Syntax
ERROR: class slots... ;


Inputs
None

Outputs
None

Word description
Defines a new tuple class and a word classname that throws a new instance of the error.

Notes
The following two snippets are equivalent:
ERROR: invalid-values x y ;


TUPLE: invalid-values x y ; : invalid-values ( x y -- * ) \ invalid-values boa throw ;


Definition