Making #testHandlerFromAction pass (was: Re: [squeak-dev] The Inbox: Tests-TestRunner.156.mcz)

Levente Uzonyi leves at elte.hu
Tue Aug 14 01:52:23 UTC 2012


On Mon, 13 Aug 2012, Frank Shearar wrote:

>
> Well, it must either be an expected error or killed :) It looks like a
> _desirable_ behaviour: I was surprised to see the test fail, once I
> read it. Given that I've been monkeying around with exception handling
> a fair bit over the last year, I don't mind taking a crack at making
> the test pass for 4.5.

Currently the stack looks something like this when ZeroDivide is raised:

ZeroDivide signaler
...
Error signaler
...
inner ZeroDivide handler
...
Error handler
...
outer ZeroDivide handler
...
bottom

Since finding the matching exception handler is done by walking down the 
stack (primitive 197), so it's obvious why the inner handler is activated. 
Maybe the simplest solution is to store the currently active exception 
handler context in the process and start looking for a handler from the 
one below it if there's one. You can find a simple changeset which 
implement this here: 
http://leves.web.elte.hu/squeak/partialFixForTestHandlerFromAction.st
If you load it into a "throw-away" image, you'll find that 
#testHandlerFromAction passes, but #testHandlerReentrancy breaks. It seems 
to be DebuggerMethodMap returning wrong #tempNames for the contexts.


Levente


More information about the Squeak-dev mailing list