--- a/GenericException.st Sat Mar 18 19:00:40 2017 +0100
+++ b/GenericException.st Sat Mar 18 19:02:56 2017 +0100
@@ -2031,17 +2031,19 @@
|val|
- aHandlerBlock argumentCount == 0 ifTrue:[
- "0-arg handler or any object - not interested in the exception argument"
- val := aHandlerBlock value
+ (aHandlerBlock isBlockWithArgumentCount:1) ifTrue:[
+ "1-arg handler - pass myself as exception argument"
+ val := aHandlerBlock value:self.
] ifFalse:[
- "1-arg handler - pass myself as exception argument"
- val := aHandlerBlock value:self.
+ "0-arg handler or any object - not interested in the exception argument"
+ val := aHandlerBlock value
].
"handler fall through - is just like a #return:(aHandlerBlock value)"
self return:val
+
+ "Modified: / 18-03-2017 / 18:08:40 / stefan"
!
doRaise