[FIX][BUG] ExceptionTester>>simpleOuterTest fails ( fix for #resumeUnchecked attached, plus addition SUnit test )

Tim Rowledge tim at sumeru.stanford.edu
Wed May 26 23:42:44 UTC 2004

Well bravo to David for looking into this - it hurts my head horribly to
mess with exceptions and I swore I'd never do so again after spending
eighteen months trying to persuade people that having the support prims
in the VM made sense.

However, this is an IMPORTANT bug. If exceptions and unwinds are to be
used they have to be dealt with correctly.

I hope that David's fix is not the correct one since it changes
#returnUnchecked: to always return from the signalContext whereas the
comment claims it should return from somewhere else if the method is
called after an #outer. Part of the trouble here is a very unclear
comment. I'm hoping that changing #outer will be a solution - but since
it isn't actually used anywhere except in the test that was failing
it's a bit hard to see what it is meant to do. Another lousy comment.

Whilst digging around I was also startled by the current implementation
of #aboutToReturn:through: which really doesn't look as if it could
possibly work. I'm reasonably convinced that it
shouldn't involve #terminateTo: until after the unwinding is completed
but I could be wrong. Can anyone explain the comment in
ContextPart>return: ? If nothing else it's a bit strange to not make
use of the VM provided initial context.

I suggest that a key part of getting this sorted out is a good number
of tests that actually exercise the system thoroughly. The current
exception testing is just sixteen tests which surely can't be covering
all the kinds of use (and abuse) that exceptions are subjected to?

Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Drugs may lead to nowhere, but at least it's the scenic route.

More information about the Squeak-dev mailing list