Signal.st
changeset 2 6526dde5f3ac
parent 1 a27a279701f8
child 3 24d81bf47225
--- a/Signal.st	Fri Jul 16 11:39:45 1993 +0200
+++ b/Signal.st	Mon Oct 04 11:32:33 1993 +0100
@@ -118,7 +118,10 @@
 
 raise
     "raise a signal - create an Exception object
-     and call the handler with this as argument."
+     and call the handler with this as argument.
+     This could have been redefined to use raiseRequestWith:, but
+     has not to not add too many contexts to the backtrace (which
+     would make look things more complicated)"
 
     |ex|
 
@@ -133,6 +136,25 @@
 
 raiseRequestWith:aParameter
     "raise a signal - create an Exception object with aParameter
+     and call the handler with this as argument.
+     This could have been redefined to use raiseRequestWith:errorString:, but
+     has not to not add too many contexts to the backtrace (which
+     would make look things more complicated)"
+
+    |ex|
+
+    ex := Exception new signal:self.
+    ex parameter:aParameter.
+    ex resumeBlock:[:value | ^ value].
+    self evaluateHandlerWith:ex.
+
+    "mmhh - no handler found (will eventually raise a noHandlerSignal)"
+    self error:('unhandled exception: ' , notifierString).
+    ^ nil
+!
+
+raiseRequestWith:aParameter errorString:aString
+    "raise a signal - create an Exception object with aParameter
      and call the handler with this as argument."
 
     |ex|
@@ -143,7 +165,7 @@
     self evaluateHandlerWith:ex.
 
     "mmhh - no handler found (will eventually raise a noHandlerSignal)"
-    self error:('unhandled exception: ' , notifierString).
+    self error:('unhandled exception: ' , aString).
     ^ nil
 ! !