Re: Event loop
Re: Event loop
- Subject: Re: Event loop
- From: Benjohn <email@hidden>
- Date: Thu, 2 Dec 2004 16:52:49 +0000
On 2 Dec 2004, at 15:27, Benjohn wrote about a plan to catch exceptions:
To implement this, I will subclass NSApplication, and override
sendAction:to:from:. The replacement method will call the base class
method in a try catch block. Any exceptions that are caught will be
packaged up and sent of to some error reporting system.
Nice plan or not, it didn't work...
It looks like a c++ exception can be thrown and caught, provided that
it only propagates through our code. If a c++ exception would propagate
through the foundation or app kit, __cxa_throw is called instead, which
leads to the application terminating [1]. I am guessing that this is
because the app kit and foundation are not compiled to allow c++
exceptions to be thrown through them? My knowledge of c++ exception
implementation is not good enough to know if this is the case.
Is there a good solution to this? We have ticked "Enable c++
exceptions" in our Xcode project's settings, so that doesn't seem to be
the problem.
Thanks very much,
Cheers,
Benjohn
[1] rather than unwinding the stack (as happens when an exception is
caught successfully), more stuff is piled on to the call stack after
the c++ throw:
__cxa_throw -> std::terminate() -> __cxxabiv1::__terminate( void (*)()
) -> abort -> _kill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Event loop (From: Benjohn <email@hidden>) |