Re: still lost
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>) |