﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
233	Colliding Exceptions Not Detected	ajbeach		"Considering the following function:
{{{
void too_many(void) {
    try {
        throw exception_zero;
    } finally {
        throw exception_one;
    }
}
}}}
Here what exception does this function throw? Both actually, unless the entire program to aborts before we get to throwing exception_one. The problem is if exception_zero is caught the stack will be unwind and run throw exception_one, if it is caught it will be caught outside the finally clause. The handler of exception_one cannot return control to the finally block so we cannot resume handling exception_zero (even if it's handler still exists) and there is a section of stack that wants to be unwound twice.

I believe this can only happen in code that is run during an unwind operation. Which means finally clauses and destructors. I do not believe there is a general way of handling this so I recommend the C++ approach and abort the program if it happens.

In terms of style I would recommend never throwing in a finally or destructor, but function calls make that impossible to check. So this might have to be a runtime check, an extra annotation used but the personality function that says ""you shouldn't be unwinding/searching across this line"" and aborts if there is an attempt to do so."	defect	new	minor	cfa-cc	1.0			
