• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Uncaught exception handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Cocoa Programming...
  • Next by Date: Re: Open A Sheet
  • Previous by thread: Re: NSCopyBits and expose events
  • Next by thread: NSTextField cannot draw in white?
  • Index(es):
    • Date
    • Thread