ERROR:
Factor handbook > The language > Exception handling

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


Vocabulary
syntax

Syntax
ERROR: class slots... ;


Inputs and outputs
classa new tuple class to define
slotsa list of slot names


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