• 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
Will a breakpoint on objc_exception_throw stop on @throw?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Will a breakpoint on objc_exception_throw stop on @throw?
      • From: Chris Suter <email@hidden>
  • Prev by Date: Re: Out-of-order Undos and NSTextField [SOLVED, well sort of]
  • Next by Date: Re: Will a breakpoint on objc_exception_throw stop on @throw?
  • Previous by thread: Re: Selector Not Recognized
  • Next by thread: Re: Will a breakpoint on objc_exception_throw stop on @throw?
  • Index(es):
    • Date
    • Thread