Save thread death errors

db4
Slava Pestov 2008-02-21 01:24:24 -06:00
parent 2f2242a1a3
commit 2342169d87
1 changed files with 2 additions and 1 deletions

View File

@ -110,11 +110,12 @@ PRIVATE>
SYMBOL: thread-error-hook
: rethrow ( error -- * )
dup save-error
catchstack* empty? [
thread-error-hook get-global
[ 1 (throw) ] [ die ] if*
] when
dup save-error c> continue-with ;
c> continue-with ;
: recover ( try recovery -- )
>r [ swap >c call c> drop ] curry r> ifcc ; inline