[cxx-abi-dev] __cxa_current_exception_type

Mark Mitchell mark at codesourcery.com
Sun Nov 18 00:32:18 UTC 2001


> I don't think so; I think try/catch are a better way to get a handle on
> the exception object.  When I started writing a verbose terminate handler,
> originally I was trying to hand the object pointer from the EH structures
> off to the dynamic cast machinery by hand to get an exception*, until I
> realized that I could just write
>
>   try { throw; }
>   catch (exception& e) { ... }
>   catch (...) { }
>
> which is both simpler and portable.

Clever.

I think your ABI extension is a good one, and I don't see any reason
not to include it.  If there aren't any objections in the next week,
I'll include it.  (I've put a sticky on my virtual calendar to
remind me.)

I guess we should make this optional, in the same sense as the
priority stuff is optional -- if you implement this, this is what
you should do, but if you're trying to write code portable across
ABI implementations, you should not depend on this being present.

Do you agree?

-- 
Mark Mitchell                mark at codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com



More information about the cxx-abi-dev mailing list