[cxx-abi-dev] __cxa_vec_new2 and deallocation functions that throw exceptions
Mark Mitchell
mark at codesourcery.com
Thu May 15 07:38:19 UTC 2003
On Thu, 2003-05-15 at 00:13, Dennis Handly wrote:
> >[except.terminate]
> > --when the exception handling mechanism, after completing evaluation
> > of the expression to be thrown but before the exception is caught
> > (_except.throw_), calls a user function that exits via an uncaught
> > exception,1)
>
> So what does uncaught exception mean? Any exception without a handler?
> (That footnote needs to be expanded.)
>
> Or anytime you throw when uncaught_exception is true, 18.6.4(2)?
>
> This disallows throws that are caught locally in destructors, while
> unwinding. Or is this not "exiting", so legal?
A function can exit either by use of "return" (including falling off the
end of the function), by throwing exception, or by calling longjmp. If
a destructor catches the exception, it does not exit by throwing an
exception.
So, yes, the situation you describe is legal.
--
Mark Mitchell <mark at codesourcery.com>
CodeSourcery, LLC
More information about the cxx-abi-dev
mailing list