[Pharo-project] About testing that ensure works

Stéphane Ducasse stephane.ducasse at inria.fr
Sun Apr 24 13:10:58 CEST 2011


I read what I wrote on the exception chapter and also the comments of the ensure: method
and I do not get why 

>> 
> error are not causing ensure block to trigger.
> only after you either abandon or proceed, an ensure block will be executed.

to me it completely defeats the purpose of ensure: or ifCurtailed: 

Evaluate a termination block after evaluating the receiver, regardless of
	 whether the receiver's evaluation completes.

So when should ensure: be used? 
if I get an error because of a file problem will it be triggered?

I do not see how this is working in that case
	
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.pdf
Type: application/pdf
Size: 65054 bytes
Desc: not available
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20110424/ac78cba0/attachment.pdf>
-------------- next part --------------


Stef


More information about the Pharo-project mailing list