]> gitweb.factorcode.org Git - factor.git/commitdiff
continuations: Moving usages of rethrow below where it's defined. I don't know if...
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 7 Apr 2016 00:55:47 +0000 (17:55 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 7 Apr 2016 00:55:47 +0000 (17:55 -0700)
core/continuations/continuations.factor

index 20ea0fe399a51059976faa2d3df222ad59e68d6d..a3402e7a164411f853e8e9e557a20348eca7fd39 100644 (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 )
     [
         [