ExceptionHandlerSet.st
branchjv
changeset 18045 c0c600e0d3b3
parent 17911 a99f15c5efa5
parent 15063 5f491d49189d
child 19478 1f5aa87f6170
--- a/ExceptionHandlerSet.st	Tue Apr 16 14:27:04 2013 +0200
+++ b/ExceptionHandlerSet.st	Thu Apr 18 20:41:50 2013 +0200
@@ -110,6 +110,7 @@
 "
 ! !
 
+
 !ExceptionHandlerSet methodsFor:'Compatibility-VW5.4'!
 
 on:aSignalOrException handle:aHandler
@@ -120,18 +121,23 @@
     "Created: / 26.7.1999 / 09:51:37 / stefan"
 ! !
 
+
 !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'!
 
 accepts:anExceptionHandler
@@ -215,6 +221,7 @@
     ^ false
 ! !
 
+
 !ExceptionHandlerSet methodsFor:'save evaluation'!
 
 handleDo:aBlock
@@ -313,6 +320,7 @@
     "Modified: / 26.7.1999 / 11:36:47 / stefan"
 ! !
 
+
 !ExceptionHandlerSet methodsFor:'testing'!
 
 isExceptionHandler
@@ -322,15 +330,14 @@
     ^ true
 ! !
 
+
 !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 $'
 !
 
 version_SVN
     ^ '$Id: ExceptionHandlerSet.st 10761 2012-01-19 11:46:00Z vranyj1 $'
 ! !
 
-
-