1 USING: help.syntax help.markup ;
\r
5 { $syntax "DESCRIPTIVE: word ( inputs -- outputs ) definition ;" }
\r
6 { $description "Defines a word such that, if an error is thrown from within it, that error is wrapped in a descriptive tag including the arguments to that word." } ;
\r
9 { $syntax "DESCRIPTIVE:: word ( inputs -- outputs ) definition ;" }
\r
10 { $description "Defines a word which uses locals such that, if an error is thrown from within it, that error is wrapped in a descriptive tag including the arguments to that word." } ;
\r
13 { $class-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)." } ;
\r
15 ARTICLE: "descriptive" "Descriptive errors"
\r
16 "This vocabulary defines automatic descriptive errors. Using it, you can define a word which acts as normal, except when it throws an error, the error is wrapped in a special descriptor declaring that an error was thrown from inside that word, and including the arguments given to that word. The error is of the following class:"
\r
17 { $subsection descriptive }
\r
18 "To define words which throw descriptive errors, use the following words:"
\r
19 { $subsection POSTPONE: DESCRIPTIVE: }
\r
20 { $subsection POSTPONE: DESCRIPTIVE:: } ;
\r
22 ABOUT: "descriptive"
\r