Exception.st
changeset 54 06dbdeeed4f9
parent 44 b262907c93ea
child 68 59faa75185ba
--- a/Exception.st	Tue Feb 15 15:33:34 1994 +0100
+++ b/Exception.st	Fri Feb 25 13:58:55 1994 +0100
@@ -24,7 +24,7 @@
 COPYRIGHT (c) 1993 by Claus Gittinger
               All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Exception.st,v 1.5 1994-01-16 03:40:24 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Exception.st,v 1.6 1994-02-25 12:57:09 claus Exp $
 '!
 
 !Exception class methodsFor:'documentation'!
@@ -66,6 +66,24 @@
 No Emergency mechanism is currently implemented - an unhandled signal currently
 goes always into the debugger; the method found dealing with it exist only
 for compatibility reasons only.
+
+instance variables:
+    signal           <Signal>   the signal which is responsible for all of this
+    parameter        <Object>   the parameter passed to raiseRequestWith: or nil (for raise)
+    errorString      <String>   the signals notifierString, or the string given to raise
+    suspendedContext <Context>  the context, in which the raise occured
+
+    handlerContext   <Context>  the handlers (if found) context
+    resumeBlock      <Block>    used during handler evaluation to get back
+    rejectBlock      <Block>    used during handler evaluation to reject
+
+Class variables:
+    EmergencyHandler <Block>    this block is evaluated, if no handler was defined
+                                for a signal (i.e. this one is responsible for the
+                                unhandled exception debugger).
+                                Having this being a block allows to globally catch
+                                these errors - even if cought by someone not nesting
+                                around the erronous code (as the catch/through does).
 "
 ! !
 
@@ -73,7 +91,10 @@
 
 initialize
     EmergencyHandler := [:ex :con |
+"
         (ex signal) error:('unhandled exception: ' , ex signal notifierString)
+"
+        (ex signal) enterDebuggerWith:('unhandled exception: ' , ex errorString).
     ]
 ! !