• 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: still lost
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: still lost


  • Subject: Re: still lost
  • From: Conrad Shultz <email@hidden>
  • Date: Wed, 18 Jul 2012 13:37:36 -0700


On Jul 18, 2012, at 1:02 PM, Charlie Dickman wrote:

I have defined an error handler in my app...

- (BOOL) exceptionHandler: (NSExceptionHandler *) sender
shouldLogException: (NSException *) exception
mask: (NSUInteger) aMask {
and I have sent the following message...

[[NSExceptionHandler defaultExceptionHandler] setExceptionHangingMask: 512];

which, apparently, is not enough to have exceptions channelled to my exception handler as they are still only appearing in the console. 

What can I do to further my quest of determining where errors such as invalid indices are coming from?


I've never used NSExceptionHandler, but from the class documentation it seems that you probably need to:

[[NSExceptionHandler defaultExceptionHandler] setDelegate:instanceThatImplementedYourCustomExceptionHandler];

(Note that -exceptionHandler:shouldLogException:mask: is a delegate method.)

You also usually don't want to use literal bitmasks (or other literals - use constants).  Actually, I'm confused by your -setExceptionHangingMask:512; the highest "system hang constant" is NSHangOnOtherExceptionMask = 1 << 4.  Did you mean -setExceptionHandlingMask:512?

In any case, I've never dealt with this class, probably because I've always found that simply enabling exception breakpoints is sufficient to discover what's happening.  Did that not work for you?

-Conrad
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >still lost (From: Charlie Dickman <email@hidden>)

  • Prev by Date: still lost
  • Next by Date: Re: LLDB: evaluating expressions
  • Previous by thread: still lost
  • Next by thread: Protecting memory
  • Index(es):
    • Date
    • Thread