Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Catching C++ exceptions thrown from a framework



Sam, this is a semi-well-known problem.

GCC decides to give an exception to a handler when the typeinfo of the exception matches that of the handler (or is a sub-class).  But the comparsion isn't based on the munged name of the symbol, it's based on the equality of a integer constant that's handled out by the linker.

So you need to export the typeinfo symbols representing the exceptions you care about from both the catcher and catchee. 

The easiest way to see if this is your problem is to export all symbols, and don't strip any symbols, and see if the problem goes away.

If this helps you, thank Marshal Clow for reading your problem and remembering that I had the same one months ago.  Oh, and Lisa Lippencott and Sean Parent for explaining the answer to me back then.  And the academy.  And mom.
-- 
//-------------------------------------------------
email@hidden                virtual-fx, inc.           617 314-9400
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.