Uncaught exception handling
Uncaught exception handling
- Subject: Uncaught exception handling
- From: Gideon King <email@hidden>
- Date: Sun, 30 Jun 2002 18:59:54 +0800
I am trying to catch uncaught exceptions in my application.
I set up the exception handler in my NSApplication subclass's init
method like so:
[[NSExceptionHandler defaultExceptionHandler]
setExceptionHandlingMask:
NSHandleUncaughtExceptionMask|
NSHandleUncaughtSystemExceptionMask|
NSHandleUncaughtRuntimeErrorMask|
NSHandleTopLevelExceptionMask|
NSHandleOtherExceptionMask];
NSSetUncaughtExceptionHandler(MyUncaughtExceptionHandler);
but there are two problems:
1. It only seems to get called when the exception is thrown in the
application subclass.
2. It still logs the error to the console and quits the application -
I'd like to stop, and allow the user to email a bug report to me, &
perhaps try to save open documents.
Can anyone help to resolve these issues?
Thanks
Gideon
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.