NoHandlerError.st
branchjv
changeset 18050 131d0413b25b
parent 18040 a11a12546f23
parent 15110 4e9ac880e0ac
child 18060 3708e12e9aa8
--- a/NoHandlerError.st	Fri Apr 19 09:38:48 2013 +0200
+++ b/NoHandlerError.st	Tue Apr 23 14:27:19 2013 +0100
@@ -160,7 +160,7 @@
                  (for example, segv in primitive code could show things 
                   on the C-level ..)
                 "
-                ex signal openDebuggerOnException:ex.
+                ex creator openDebuggerOnException:ex.
 
                 "if we arrive here, the debugger did proceed.
                  the value returned by #openDebuggerOnException: is the exceptions value ..."
@@ -254,8 +254,8 @@
     ^ [:ex |
              |str printedException|
 
-             ex signal == NoHandlerError ifTrue:[
-                printedException := ex unhandledException.
+             ex creator == NoHandlerError ifTrue:[
+                printedException := ex exception.
              ] ifFalse:[
                 printedException := ex
              ].
@@ -264,7 +264,7 @@
              "/ allow user to choose between proceeding or aborting
              "/ but never dump that information to the file.
 
-             printedException signal == Object userInterruptSignal ifTrue:[
+             printedException creator == Object userInterruptSignal ifTrue:[
                   (self confirm:'abort current action ?') ifTrue:[
                       AbortOperationRequest raise
                   ].
@@ -282,7 +282,7 @@
              str cr.
 
              str nextPutLine:('** Error: ' , printedException description).
-             str nextPutLine:('** Signal: ' , printedException signal printString).
+             str nextPutLine:('** Signal: ' , printedException creator printString).
              str nextPutLine:('** Parameter: ' , printedException parameter printString).
              str nextPutLine:('** Process: ' , Processor activeProcess printString).
              str nextPutLine:('** Backtrace:').
@@ -329,8 +329,8 @@
     ^ [:ex |
             |str printedException doMail emergencyMailReceiver pipe|
 
-            ex signal == NoHandlerError ifTrue:[
-               printedException := ex unhandledException.
+            ex creator == NoHandlerError ifTrue:[
+               printedException := ex exception.
             ] ifFalse:[
                printedException := ex
             ].
@@ -339,7 +339,7 @@
              "/ allow user to choose between proceeding or aborting
              "/ but never dump that information to the file.
 
-             printedException signal == UserInterrupt ifTrue:[
+             printedException creator == UserInterrupt ifTrue:[
                   (self confirm:'abort current action ?') ifTrue:[
                       AbortOperationRequest raise
                   ].
@@ -372,7 +372,7 @@
 
                 str nextPutLine:('Time: ' , Timestamp now printString).
                 str nextPutLine:('Error: ', printedException description).
-                str nextPutLine:('Signal: ', printedException signal printString).
+                str nextPutLine:('Signal: ', printedException creator printString).
                 str nextPutLine:('Parameter: ', printedException parameter printString).
                 str nextPutLine:('Process: ', Processor activeProcess printString).
                 str nextPutLine:'Backtrace:'.
@@ -421,9 +421,9 @@
 
         message := ex descriptionForDebugger.
 
-        (ex signal == NoHandlerError
-         and:[(ControlInterrupt handles:ex unhandledException)
-         and:[(ControlInterrupt ~~ ex unhandledException signal) ]]) ifTrue:[
+        (ex creator == NoHandlerError
+         and:[(ControlInterrupt handles:ex exception)
+         and:[(ControlInterrupt ~~ ex exception creator) ]]) ifTrue:[
             "/ go directly into the debugger ...
             ^ Debugger
                 enter:ex returnableSuspendedContext
@@ -462,8 +462,8 @@
 
         Processor activeProcessIsSystemProcess ifTrue:[
             'EmergencyHandler [info]: exception cought: ' errorPrint.
-            ex signal == NoHandlerError ifTrue:[
-                theException := ex unhandledException.
+            ex creator == NoHandlerError ifTrue:[
+                theException := ex exception.
             ] ifFalse:[
                 theException := ex
             ].
@@ -472,9 +472,9 @@
         ] ifFalse:[
             message := ex descriptionForDebugger.
 
-            (ex signal == NoHandlerError
-            and:[ (ControlInterrupt handles:ex unhandledException)
-            and:[ (ControlInterrupt ~~ ex unhandledException signal) ]]) ifTrue:[
+            (ex creator == NoHandlerError
+            and:[ (ControlInterrupt handles:ex exception)
+            and:[ (ControlInterrupt ~~ ex exception creator) ]]) ifTrue:[
                 "/ go directly into the debugger ...
                 ^ Debugger
                     enter:ex returnableSuspendedContext
@@ -503,14 +503,24 @@
 
 !NoHandlerError methodsFor:'accessing'!
 
+exception
+    "the original exception, which was responsible for this.
+     ANSI compatibility"
+
+    ^ parameter
+!
+
 originalSignal
     "return the signal/exception which was originally raised.
-     For noHandler, that is my unhandled signal; for others, thats the exception itself."
+     For noHandler, that is my unhandled signal; for others, that's the exception itself."
 
     ^ parameter originalSignal.
 !
 
 unhandledException
+    "the original exception, which was responsible for this.
+     Obsolete: use #exception for ANSI comatibility."
+
     ^ parameter
 ! !
 
@@ -567,11 +577,11 @@
 !NoHandlerError class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/NoHandlerError.st,v 1.20 2013-03-26 14:20:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/NoHandlerError.st,v 1.21 2013-04-19 08:39:04 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/NoHandlerError.st,v 1.20 2013-03-26 14:20:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/NoHandlerError.st,v 1.21 2013-04-19 08:39:04 cg Exp $'
 ! !