Fix a problem printing slice errors, fix a load order issue

slava 2006-08-01 22:27:07 +00:00
parent 6c7325706d
commit bcf30cf1af
5 changed files with 13 additions and 12 deletions

View File

@ -9,6 +9,9 @@ USING: generic namespaces sequences ;
IN: errors
USING: kernel ;
SYMBOL: error
SYMBOL: error-continuation
: catch ( try -- error | try: -- )
[ >c call f c> drop f ] callcc1 nip ; inline

View File

@ -1,5 +1,13 @@
USING: errors help kernel kernel-internals ;
HELP: error f
{ $description "Global variable holding most recently thrown error." }
{ $notes "Only updated by " { $link throw } ", not " { $link rethrow } "." } ;
HELP: error-continuation f
{ $description "Global variable holding current continuation of most recently thrown error." }
{ $notes "Only updated by " { $link throw } ", not " { $link rethrow } "." } ;
HELP: >c "( continuation -- )"
{ $values { "continuation" "a continuation" } }
{ $description "Pushes an exception handler continuation on the catch stack. The continuation must have been reified by " { $link callcc1 } "." } ;

View File

@ -19,8 +19,6 @@ M: tuple error-help ( error -- topic ) class ;
M: string error. ( error -- ) print ;
SYMBOL: error
SYMBOL: error-continuation
SYMBOL: restarts
: :s error-continuation get continuation-data stack. ;
@ -68,7 +66,7 @@ SYMBOL: restarts
":s - data stack at exception time" [ :s ] (debug-help)
":r - retain stack at exception time" [ :r ] (debug-help)
":c - call stack at exception time" [ :c ] (debug-help)
":get ( var -- value ) accesses variables at time of error" print
":get ( var -- value ) accesses variables at time of the error" print
flush ;
: print-error ( error -- )

View File

@ -2,14 +2,6 @@ IN: errors
USING: alien arrays generic help inference kernel math memory
strings vectors ;
HELP: error f
{ $description "Global variable holding most recently thrown error." }
{ $notes "Only updated by " { $link throw } ", not " { $link rethrow } "." } ;
HELP: error-continuation f
{ $description "Global variable holding current continuation of most recently thrown error." }
{ $notes "Only updated by " { $link throw } ", not " { $link rethrow } "." } ;
HELP: restarts f
{ $description "Global variable holding the set of possible restarts for the most recently thrown error." }
{ $notes "Only updated by " { $link throw } ", not " { $link rethrow } "." } ;

View File

@ -134,7 +134,7 @@ M: no-cond summary
M: slice-error error.
"Cannot create slice because " write
slice-error-reason append print ;
slice-error-reason print ;
M: no-word summary
drop "Word not found in current vocabulary search path" ;