ExceptionHandlerSet.st
changeset 15063 5f491d49189d
parent 11636 2a4feb56ca70
child 18045 c0c600e0d3b3
child 19444 70d035d69cf1
--- a/ExceptionHandlerSet.st	Thu Apr 04 09:59:34 2013 +0200
+++ b/ExceptionHandlerSet.st	Thu Apr 04 11:37:41 2013 +0200
@@ -122,14 +122,17 @@
 
 !ExceptionHandlerSet methodsFor:'adding'!
 
-on:aSignalOrException do:aHandler
+on:anExceptionHandler do:aHandlerBlock
     "add a handler for aSignal to the set"
 
-    aSignalOrException isBehavior ifTrue:[
+    anExceptionHandler isBehavior ifTrue:[
         "load class, if not yet loaded"
-        aSignalOrException autoload.
+        anExceptionHandler autoload.
     ].
-    self at:aSignalOrException put:aHandler
+    anExceptionHandler isExceptionHandler ifFalse:[
+        SignalError raiseWith:anExceptionHandler errorString:' - trying to add a non-exceptionHandler to a SignalSet'.
+    ].
+    self at:anExceptionHandler put:aHandlerBlock
 ! !
 
 !ExceptionHandlerSet methodsFor:'queries'!
@@ -325,5 +328,6 @@
 !ExceptionHandlerSet class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ExceptionHandlerSet.st,v 1.17 2009-03-17 16:21:46 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExceptionHandlerSet.st,v 1.18 2013-04-04 09:37:41 stefan Exp $'
 ! !
+