Save thread death errors
							parent
							
								
									2f2242a1a3
								
							
						
					
					
						commit
						2342169d87
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue