Maybe this would be more clear? aBlock doNotRaise: anException unlessDescriptionIncludes: aString aBlock doNotRaise: anException ifDescriptionIncludes: aString All the best, Ron Teitelbaum From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of Nicolas Cellier Sent: Tuesday, July 09, 2013 4:45 PM To: Pharo Development List Subject: Re: [Pharo-dev] the return of the strange methods "should not raise an exceptional event whose description does not include" wow, who is crooked enough to use double negation ;) Nicolas 2013/7/9 Stéphane Ducasse <stephane.ducasse@inria.fr> So + 1 :)
- shouldnt: aBlock raise: anExceptionalEvent
whoseDescriptionDoesNotInclude: subString description: aString
- shouldnt: aBlock raise: anExceptionalEvent whoseDescriptionIncludes: subString description: aString
I honestly cannot wrap my head around these two methods.
They show that the code in the block raises an _informative_ exception. So you get a FileNotFound exception... but what was the missing file? I don't know! Noone bothered to mention it!
no it is #shouldnt: it is the inverse. the #should:... handler methods are fine, but these specific two methods are just insane. I tried to reimplement them without looking at the original definition and I cannot come up with something that matches the name :) so there is definitely something wrong with it.