[Seaside-dev] Seaside and exception behaviour

Paolo Bonzini bonzini at gnu.org
Wed Jan 5 16:15:41 UTC 2011


On 01/05/2011 04:58 PM, mkobetic at cincom.com wrote:
> > >  Here's maybe a bit more concise example. If you run the thing below in a workspace,
> > >  it should return 'Squeak' in Squeak and 'VW' in VW
> > >
> > >  [	[	[	self error: 'trigger error'
> > >  		] on: ZeroDivide do: [ :ex | 'Squeak' ]
> > >  	] on: Error do: [ :ex | 3 / 0 ]
> > >  ] on: ZeroDivide do: [ :ex | 'VW' ]
> >
> >  It returns 'Squeak' on GNU Smalltalk.  This is consistent with my
> >  analysis of Alan's snippet.  Unfortunately I don't have at hand my copy
> >  of the standard.
>
> FWIW, Smalltalk/X returns 'VW'

That's the correct behavior.  The standard says the search should 
proceed from the last exception handler that was created up to the oldest.

(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).

Does VW have #on:do:on:do:?  If so, what happens for

	[	[	self error: 'trigger error'
   		] on: ZeroDivide do: [ :ex | 'Squeak' ]
   	] on: Error do: [ :ex | 3 / 0 ]
	  on: ZeroDivide do: [ :ex | 'VW' ]

Paolo


More information about the seaside-dev mailing list