A question about #runUntilErrorOrReturnFrom:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

A question about #runUntilErrorOrReturnFrom:

Jaromir Matas
Hi all,
#runUntilErrorOrReturnFrom: installs an ensure context later it removes it. The removal is done via this line:

                "No error was raised, remove ensure context by stepping until popped"
                [ctxt isDead] whileFalse: [topContext := topContext stepToCallee].

Would you agree the following line is equivalent (and more straightforward):

                "No error was raised, remove ensure context by making its sender a top context"
                topContext := ctxt sender push: nil.

I'm trying to eliminate all simulation code from a normal termination procedure I'm working on and this is the last bit :) I'm looking forward to hearing your opinion.

Thanks,
^[^ Jaromir