Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exceptions



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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.