• 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
Re: Exceptions never reach my uncaught exception handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exceptions never reach my uncaught exception handler


  • Subject: Re: Exceptions never reach my uncaught exception handler
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 23 Jan 2002 12:16:05 -0800

On Wednesday, January 23, 2002, at 11:53 AM, Itrat Khan wrote:

In a document-based Cocoa application, could something like
NSApplication be intercepting uncaught exceptions? I thought stuff like
this would trigger my uncaught exception handler:

[NSException raise:@"foo" format:@"bar"], or
[[NSArray array] objectAtIndex:10]

These exceptions never reach my handler, but they do log exceptions on
the console, so someone must be catching them. (I don't have any try
blocks in my code.) Uncaught exceptions usually log a message like, an
uncaught exception has occurred," but none of my forced exceptions say
that.

NSApplication catches otherwise uncaught exceptions occurring within its main event loop, and calls its reportException: method. You can implement this method in your NSApplication subclass to be notified when these occur.

Douglas Davidson


References: 
 >Exceptions never reach my uncaught exception handler (From: Itrat Khan <email@hidden>)

  • Prev by Date: Exceptions never reach my uncaught exception handler
  • Next by Date: Re: Exceptions never reach my uncaught exception handler
  • Previous by thread: Exceptions never reach my uncaught exception handler
  • Next by thread: Re: Exceptions never reach my uncaught exception handler
  • Index(es):
    • Date
    • Thread