Better error message printout in extra/descriptive

db4
U-SLAVA-DFB8FF805\Slava 2009-04-02 13:11:06 -05:00
parent a40b4f6dfa
commit 2c556fbb65
1 changed files with 7 additions and 4 deletions

View File

@ -1,13 +1,16 @@
USING: words kernel sequences locals locals.parser
locals.definitions accessors parser namespaces continuations
summary definitions generalizations arrays ;
summary definitions generalizations arrays prettyprint debugger io ;
IN: descriptive
ERROR: descriptive-error args underlying word ;
M: descriptive-error summary
word>> "The " swap name>> " word encountered an error."
3append ;
M: descriptive-error error.
"The word " write dup word>> pprint " encountered an error." print
"Arguments:" print
dup args>> stack.
"Error:" print
underlying>> error. ;
<PRIVATE