[Gc] workaround for C++ exceptions problem

Filip Pizlo pizlo at mac.com
Tue Jan 24 19:58:31 PST 2006


On Jan 24, 2006, at 10:43 PM, skaller wrote:

> 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'.

I figured it wasn't the right terminology to use, but assumed  
everyone would know what I meant.  The point is that the exception  
objects and their types are being managed by the C++ runtime.

> 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.

By 'in flight', I've always meant the union of "not landed" and "not  
parked".  Feel free to substitute accordingly.

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

Thanks for the clarification.

-Filip


>
>
> -- 
> John Skaller <skaller at users dot sf dot net>
> Felix, successor to C++: http://felix.sf.net
>
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/



More information about the Gc mailing list