--- a/MessageNotUnderstood.st Thu Jul 25 12:06:06 2002 +0200
+++ b/MessageNotUnderstood.st Thu Jul 25 17:49:13 2002 +0200
@@ -25,6 +25,22 @@
^ true
! !
+!MessageNotUnderstood class methodsFor:'save evaluation'!
+
+ignoreNotUnderstoodOf:aSelector in:aBlock
+ "evaluate aBlock; if a messageNotUnderstood occurs,
+ for which the message was aSelector, ignore the error
+ and return.
+ Other selector errors lead into the debugger.
+ If no error occurs, return the blocks value"
+
+ ^ self handle:[:ex |
+ ex parameter selector == aSelector ifFalse:[
+ ex reject
+ ]
+ ] do:aBlock.
+! !
+
!MessageNotUnderstood methodsFor:'accessing'!
message
@@ -57,5 +73,5 @@
!MessageNotUnderstood class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/MessageNotUnderstood.st,v 1.3 2001-11-17 10:04:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/MessageNotUnderstood.st,v 1.4 2002-07-25 15:49:13 ca Exp $'
! !