<br clear="all">John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.<br>Skype: john_okeefe2 Mobile: +1 919 417-3181 (Business hours USA Eastern Time zone (GMT -5))<br><a href="mailto:john_okeefe@instantiations.com" target="_blank">john_okeefe@instantiations.com</a><br>
<a href="http://www.instantiations.com/" target="_blank">http://www.instantiations.com</a><br><em><strong>VA Smalltalk...Onward and Upward!</strong></em><br><br><br>
<div class="gmail_quote">On Wed, Jan 5, 2011 at 11:15 AM, Paolo Bonzini <span dir="ltr"><<a href="mailto:bonzini@gnu.org">bonzini@gnu.org</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">On 01/05/2011 04:58 PM, <a href="mailto:mkobetic@cincom.com" target="_blank">mkobetic@cincom.com</a> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">> > Here's maybe a bit more concise example. If you run the thing below in a workspace,<br>> > it should return 'Squeak' in Squeak and 'VW' in VW<br>
> ><br>> > [ [ [ self error: 'trigger error'<br>> > ] on: ZeroDivide do: [ :ex | 'Squeak' ]<br>> > ] on: Error do: [ :ex | 3 / 0 ]<br>> > ] on: ZeroDivide do: [ :ex | 'VW' ]<br>
><br>> It returns 'Squeak' on GNU Smalltalk. This is consistent with my<br>> analysis of Alan's snippet. Unfortunately I don't have at hand my copy<br>> of the standard.<br><br>FWIW, Smalltalk/X returns 'VW'<br>
</blockquote><br></div>That's the correct behavior. The standard says the search should proceed from the last exception handler that was created up to the oldest.<br><br>(That said, Squeak/gst's behavior is quite easy to justify, as stack unwinding hasn't happened yet. I'll wait for this thread to settle before changing it in gst).<br>
<br>Does VW have #on:do:on:do:? If so, what happens for<br><br> [ [ self error: 'trigger error'
<div class="im"><br> ] on: ZeroDivide do: [ :ex | 'Squeak' ]<br> ] on: Error do: [ :ex | 3 / 0 ]<br> on: ZeroDivide do: [ :ex | 'VW' ]<br><br></div><font color="#888888">Paolo</font> </blockquote>
<div> </div>
<div>VA Smalltalk returns 'VW' (as expected) for the first snippet. VA Smalltalk does not implement on:do:on:do:.</div></div>