descriptive-error ( args underlying word -- * )
Descriptive errors
Next:make-descriptive ( word -- )


Vocabulary
descriptive

Error description
The class of errors wrapping another error (in the underlying slot) which were thrown in a word (in the word slot) with a given set of arguments (in the args slot).

Definition
IN: descriptive

TUPLE: descriptive-error
{ args read-only } { underlying read-only }
{ word read-only } ;


USING: kernel ;

IN: descriptive

: descriptive-error ( args underlying word -- * )
\ descriptive-error boa throw ;


Methods
USING: accessors debugger descriptive io kernel prettyprint ;

M: descriptive-error error.
"The word " write dup word>> pprint
" encountered an error." print "Arguments:" print
dup args>> stack. "Error:" print underlying>> error. ;