• 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: Exceptions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exceptions


  • Subject: Re: Exceptions
  • From: Greg Titus <email@hidden>
  • Date: Mon, 28 May 2001 15:19:56 -0700

On Monday, May 28, 2001, at 02:38 PM, Steve Gehrman wrote:

When I run my app I'm getting....

May 28 14:27:34 MyApp[3003] Exception raised during posting of notification. Ignored. exception: *** -[NSCFArray addObject:]: attempt to insert nil

Is there a way to get gdb to stop when it hits an exception like this?

1. Pause the app before this happens
2. Open up the "Console" pane (if you are using gdb via ProjectBuilder)
3. Type "break -[NSException raise]"

This will set a breakpoint so gdb will stop when the exception occurs. Hop up two or three frames and you'll see the point in your code where you are trying to add a nil object to an NSMutableArray...

--Greg


References: 
 >Exceptions (From: Steve Gehrman <email@hidden>)

  • Prev by Date: Re: ObjC Method naming
  • Next by Date: Re: Exceptions
  • Previous by thread: Exceptions
  • Next by thread: Re: Exceptions
  • Index(es):
    • Date
    • Thread