[Seaside-dev] Seaside and exception behaviour
mkobetic at cincom.com
mkobetic at cincom.com
Wed Jan 5 16:23:20 UTC 2011
"Paolo Bonzini"<bonzini at gnu.org> wrote:
> 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' ]
It doesn't. Personally, without knowing much about the intent of on:do:on:do:, I'd intuitively expect to get a ZeroDivide exception out of this, i.e. if the Error handler raises ZeroDivide, both ZeroDivide handlers should be out of scope at that point. Unless on:do:on:do: is meant to be just a shortcut for [ on:do: ] on:do:. Or to put it differently I'd expect on: X do: [X] on: Y do: [Y] to be equivalent to on: X, Y do: [ :ex | (X handles: ex) ifTrue: [X] ifFalse: [Y]], if that makes sense.
More information about the seaside-dev
mailing list