Re: -[NSManagedObjectContext save:] fails but gives no NSError
Re: -[NSManagedObjectContext save:] fails but gives no NSError
- Subject: Re: -[NSManagedObjectContext save:] fails but gives no NSError
- From: mmalc crawford <email@hidden>
- Date: Fri, 23 Nov 2007 14:46:37 -0800
On Nov 23, 2007, at 9:24 AM, Jerry Krinock wrote:
After I discovered and removed a bunch of stupid code, this problem
went away. It appears that I was either trying to insert or delete
objects twice, or trying to insert objects with relationships to
objects that had been deleted (inconsistent object graph).
Lesson: Do not assume that -[NSManagedObjectContext save:] will set
its argument to an NSError* whenever an error occurs. Always check
its return BOOL value, because more commonly when it fails it
returns NO but does ^not^ set the NSError*.
Under what circumstances is it not setting an error?
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden