[Gc] workaround for C++ exceptions problem

skaller skaller at users.sourceforge.net
Tue Jan 24 19:43:26 PST 2006

On Tue, 2006-01-24 at 22:20 -0500, Filip Pizlo wrote:

> However, you are right that multiple exceptions can be in flight at  
> once.  This happens when you have try blocks nested in catch blocks,  
> like:
> try {
>    throw 24;
> } catch (...) {
>    try {
>      throw 42;
>    } catch (...) {
>      // here we have two exceptions in flight: 24 and 42
>    }
> }

No. at the point you mention NO exceptions are 'in flight'.
BOTH of them have already 'landed'.

you will note that even though they've landed they 
are NOT parked yet. They can take-off again with a
rethrow (argumentless throw). However whilst they
may continue to exist until the catch handler has
ended without rethrowing .. which could be a gc issue ..
they're definitely not 'in flight' at this point.

In flight means 'taken off but not landed', that is:
thrown but not caught.

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: https://felix.sf.net

More information about the Gc mailing list