Will a breakpoint on objc_exception_throw stop on @throw?
Will a breakpoint on objc_exception_throw stop on @throw?
- Subject: Will a breakpoint on objc_exception_throw stop on @throw?
- From: Scott Ellsworth <email@hidden>
- Date: Tue, 11 Jul 2006 15:04:38 -0700
Flushed with the success of the CFZombieLevel discussion, I am
curious about the second issue raised.
Are people using objective C exceptions, and is the debugger stopping
on them for you?
I use the following code:
NSLog(@"Throwing exception");
NSException *badness = [NSException
exceptionWithName:@"ThrownException"
reason:@"Threw an exception"
userInfo:nil];
@throw badness;
I have a breakpoint set on objc_exception_throw() - the raise is
somewhere outside my own code.
#0 0x9275c1e1 in -[NSException raise]
#1 0x934c2d87 in -[NSControl mouseDown:]
#2 0x934804b7 in -[NSWindow sendEvent:]
#3 0x93472524 in -[NSApplication sendEvent:]
#4 0x9339d106 in -[NSApplication run]
#5 0x93391037 in NSApplicationMain
#6 0x0000285c in main at main.m:13
This seems like it would be hard to find the actual exception, save
by a string search of the code.
(NB - I did google on this, and did not find a lot of discussion
either way.)
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden