Is there a way to catch global "crashing" app exceptions like objc_exception_throw, EXC_ARITHMETIC etc. in code? I need that because I want to do some things before the app gets killed by the system.
+4
A:
You can set a handler for any uncaught exception by using NSSetUncaughtExceptionHandler
.
The relevant docs from Apple are here: http://developer.apple.com/mac/library/documentation/cocoa/conceptual/Exceptions/Concepts/UncaughtExceptions.html#//apple_ref/doc/uid/20000056-BAJDDGGD
pgb
2010-05-13 12:10:43
+1 Related question http://stackoverflow.com/questions/1128539
Shaji
2010-05-13 15:21:56
A:
Here's the solution I found: http://www.restoroot.com/Blog/2008/10/20/crash-reporter-for-iphone-applications-part-2/
Konstantin
2010-05-13 12:56:22