Capturing non-local returns?
Andreas Raab
andreas.raab at gmx.de
Sat May 24 09:56:13 UTC 2003
Nice trick! Thanks Avi!
Cheers,
- Andreas
> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On
> Behalf Of Avi Bryant
> Sent: Saturday, May 24, 2003 11:25 AM
> To: The general-purpose Squeak developers list
> Subject: Re: Capturing non-local returns?
>
>
>
> On Sat, 24 May 2003, Andreas Raab wrote:
>
> > 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.
>
> Will this not work?
>
> |normalReturn|
> normalReturn := false.
> [aBlock value.
> normalReturn := true]
> ensure: [normalReturn ifFalse: [...]]
>
>
More information about the Squeak-dev
mailing list
|