continuations: Moving usages of rethrow below where it's defined. I don't know if these work, but I'm trying to make the hooks throw like the stack effect requests.

locals-and-roots
Doug Coleman 2016-04-06 17:55:47 -07:00
parent 9427c78506
commit f0292db7d3
1 changed files with 4 additions and 4 deletions

View File

@ -119,8 +119,6 @@ GENERIC: error-in-thread ( error thread -- * )
SYMBOL: thread-error-hook ! ( error thread -- * )
thread-error-hook [ [ die drop rethrow ] ] initialize
M: object error-in-thread
thread-error-hook get-global call( error thread -- * ) ;
@ -128,8 +126,6 @@ M: object error-in-thread
SYMBOL: callback-error-hook ! ( error -- * )
callback-error-hook [ [ die rethrow ] ] initialize
: rethrow ( error -- * )
dup save-error
(get-catchstack) [
@ -139,6 +135,10 @@ callback-error-hook [ [ die rethrow ] ] initialize
if
] [ pop continue-with ] if-empty ;
thread-error-hook [ [ die drop rethrow ] ] initialize
callback-error-hook [ [ die rethrow ] ] initialize
: recover ( ..a try: ( ..a -- ..b ) recovery: ( ..a error -- ..b ) -- ..b )
[
[