Hi Henrik, You're very right. I will fix this this evening. Cheers, Alexandre On 2 Mar 2010, at 16:47, Henrik Sperre Johansen wrote:
On 02.03.2010 14:26, Stéphane Ducasse wrote:
Hi guys
We just released a new chapter for Pharo by Example Vol.2 on Exceptions http://pharobyexample.org/
Let us know what you think.
Stef On p4 there's an error, it says ensure: and ifCurtailed are implemented as primitives, in fact they use the exact same implementation as described of the exception handling in 15.1, the primitive is only used as a marker, and the primitive is required to fail for them to work :) In addition, I'm not too sure what sense it makes to show how to implement one with the other (nor that the implementations are actually correct, f.ex. ifCurtailed: block does not trigger on non-local returns...)
Other than that, very nice chapter! Especially liked 1.9 - 1.13, with the thorough explanation of the different ways an exception can be returned from.
Cheers, Henry
PS. For the not-so-faint-of-heart, open a Transcript and try evaluating: |proc| proc := [[Transcript show: 'Start!'. ] ensure: [Transcript show: 'Finish!' Processor yield.]] newProcess. proc resume. Processor yield. proc suspend. proc terminate.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.