Capturing non-local returns?

Andreas Raab andreas.raab at gmx.de
Fri May 23 23:06:19 UTC 2003


Hi,

I was wondering if there's a good way of capturing non-local returns and
ONLY non-local returns from some block. E.g., the problem I'm having is that
I am evaluating a block and if (and ONLY if) it attempts to do a non-local
return I want to capture the return and take some appropriate action.

Anyone having ideas on how to do this? It seems that neither #ifCurtailed:
nor #ensure helps much since the first will be evaluated upon 'abnormal
termination' (and that's not my problem as the termination is perfectly
reasonable - just attempting to bypass some important action) whereas the
latter will do it whenever we return from that block (and I don't want to do
the cleanup when the block is finished 'normally').

Cheers,
  - Andreas



More information about the Squeak-dev mailing list