Breakpoint on @throw?
Breakpoint on @throw?
- Subject: Breakpoint on @throw?
- From: Aaron Hillegass <email@hidden>
- Date: Mon, 17 Jan 2005 12:23:32 -0500
Raising old-style exceptions looked like this:
if (x == 13) {
NSException *badness = [NSException
exceptionWithName:@"BadLuckException"
reason:@"13 is
unlucky"
userInfo:nil];
[badness raise];
}
So, to stop on exceptional conditions in gdb, I'd create a breakpoint:
> fb - [NSException raise]
This works great, but with new style exceptions the raise becomes an
@throw:
if (x == 13) {
NSException *badness = [NSException
exceptionWithName:@"BadLuckException"
reason:@"13 is
unlucky"
userInfo:nil];
@throw badness;
}
(Don't forget "-fobjc-exceptions" when you build.)
Does anyone know how to put a breakpoint on @throw? Thanks.
- Aaron Hillegass
Big Nerd Ranch, Inc
http://www.bignerdranch.com/
_______________________________________________
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