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

Re: Will a breakpoint on objc_exception_throw stop on @throw?


  • Subject: Re: Will a breakpoint on objc_exception_throw stop on @throw?
  • From: Chris Suter <email@hidden>
  • Date: Wed, 12 Jul 2006 08:16:15 +1000


On 12/07/2006, at 8:04 AM, Scott Ellsworth wrote:

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.

Are you sure that's for the exception you threw? It could be you're stopping on a different exception (that may well be caught and handled).




Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Scott Ellsworth <email@hidden>
References: 
 >Will a breakpoint on objc_exception_throw stop on @throw? (From: Scott Ellsworth <email@hidden>)

  • Prev by Date: Will a breakpoint on objc_exception_throw stop on @throw?
  • Next by Date: Re: non-ASCII characters in CFString literal [Was: (no subject)]
  • Previous by thread: Will a breakpoint on objc_exception_throw stop on @throw?
  • Next by thread: Re: Will a breakpoint on objc_exception_throw stop on @throw?
  • Index(es):
    • Date
    • Thread