Re: carbon throwing objc exceptions
Re: carbon throwing objc exceptions
- Subject: Re: carbon throwing objc exceptions
- From: Joel Reymont <email@hidden>
- Date: Mon, 14 Sep 2009 22:24:49 +0100
Sean,
On Sep 14, 2009, at 9:57 PM, Shawn Erickson wrote:
Why are you attempting to catch the except at all? It looks like no
attempt is made to deal with the exception and in general exceptions
in Cocoa are truly exceptional and imply a mistake by the programmer.
Quoting from an existing bug [2]:
"If a cocoa exception is thrown in the middle of a gecko callback,
really bad things happen (like you can no longer load any pages, for
example). Cocoa exceptions are basically setjmp/longjmp, and,
presumably, without a handler, will jump back to the main event loop's
default handler. This will unwind the stack without any stack cleanup."
I wouldn't attempt to catch the exception but instead let a top
level handler get it and then make a decision to log at that point
(look at NSExceptionHandler).
This is of no use since the issue is C++ stack unwinding [1].
More he
Also CoreFoundation is not Carbon.
My bad.
Thanks, Joel
[1] https://wiki.mozilla.org/Cocoa_In_XPCOM
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=163260
---
fastest mac firefox!
http://wagerlabs.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden