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.
parent
9427c78506
commit
f0292db7d3
|
@ -119,8 +119,6 @@ GENERIC: error-in-thread ( error thread -- * )
|
||||||
|
|
||||||
SYMBOL: thread-error-hook ! ( error thread -- * )
|
SYMBOL: thread-error-hook ! ( error thread -- * )
|
||||||
|
|
||||||
thread-error-hook [ [ die drop rethrow ] ] initialize
|
|
||||||
|
|
||||||
M: object error-in-thread
|
M: object error-in-thread
|
||||||
thread-error-hook get-global call( error thread -- * ) ;
|
thread-error-hook get-global call( error thread -- * ) ;
|
||||||
|
|
||||||
|
@ -128,8 +126,6 @@ M: object error-in-thread
|
||||||
|
|
||||||
SYMBOL: callback-error-hook ! ( error -- * )
|
SYMBOL: callback-error-hook ! ( error -- * )
|
||||||
|
|
||||||
callback-error-hook [ [ die rethrow ] ] initialize
|
|
||||||
|
|
||||||
: rethrow ( error -- * )
|
: rethrow ( error -- * )
|
||||||
dup save-error
|
dup save-error
|
||||||
(get-catchstack) [
|
(get-catchstack) [
|
||||||
|
@ -139,6 +135,10 @@ callback-error-hook [ [ die rethrow ] ] initialize
|
||||||
if
|
if
|
||||||
] [ pop continue-with ] if-empty ;
|
] [ 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 )
|
: recover ( ..a try: ( ..a -- ..b ) recovery: ( ..a error -- ..b ) -- ..b )
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue