equal
deleted
inserted
replaced
37 ^ self handle:[:ex | |
37 ^ self handle:[:ex | |
38 ex parameter selector == aSelector ifFalse:[ |
38 ex parameter selector == aSelector ifFalse:[ |
39 ex reject |
39 ex reject |
40 ] |
40 ] |
41 ] do:aBlock. |
41 ] do:aBlock. |
|
42 ! |
|
43 |
|
44 ignoreNotUnderstoodOfAny:aCollectionOfSelectors in:aBlock |
|
45 "evaluate aBlock; if a messageNotUnderstood occurs, |
|
46 for which the message was any in aCollectionOfSelectors, ignore the error |
|
47 and return. |
|
48 Other selector errors lead into the debugger. |
|
49 If no error occurs, return the blocks value" |
|
50 |
|
51 ^ self handle:[:ex | |
|
52 (aCollectionOfSelectors includesIdentical:ex parameter selector) ifFalse:[ |
|
53 ex reject |
|
54 ] |
|
55 ] do:aBlock. |
42 ! ! |
56 ! ! |
43 |
57 |
44 !MessageNotUnderstood methodsFor:'accessing'! |
58 !MessageNotUnderstood methodsFor:'accessing'! |
45 |
59 |
46 message |
60 message |
66 123 perform:#foo |
80 123 perform:#foo |
67 ] on:MessageNotUnderstood do:[:ex | |
81 ] on:MessageNotUnderstood do:[:ex | |
68 Transcript showCR:ex receiver |
82 Transcript showCR:ex receiver |
69 ] |
83 ] |
70 " |
84 " |
|
85 ! |
|
86 |
|
87 selector |
|
88 ^ parameter selector |
|
89 |
|
90 " |
|
91 [ |
|
92 123 perform:#foo |
|
93 ] on:MessageNotUnderstood do:[:ex | |
|
94 Transcript show:'selector: '; showCR:ex selector storeString. |
|
95 ] |
|
96 " |
71 ! ! |
97 ! ! |
72 |
98 |
73 !MessageNotUnderstood class methodsFor:'documentation'! |
99 !MessageNotUnderstood class methodsFor:'documentation'! |
74 |
100 |
75 version |
101 version |
76 ^ '$Header: /cvs/stx/stx/libbasic/MessageNotUnderstood.st,v 1.4 2002-07-25 15:49:13 ca Exp $' |
102 ^ '$Header: /cvs/stx/stx/libbasic/MessageNotUnderstood.st,v 1.5 2002-07-25 15:51:40 ca Exp $' |
77 ! ! |
103 ! ! |