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: Jerry Krinock <email@hidden>
- Date: Tue, 4 Dec 2007 17:22:28 -0800
On 2007 Nov, 23, at 22:38, Chris Hanson wrote:
Is there any chance you can do a diff between what you have in your
SCM system and what you have now, that works, and file a bug
describing what you were doing previously?
Well, chief, fortunately I didn't have to do that.
The problem was that I had implemented validateForInsert:
(NSError**)error. I was returning NO, but ^I^ was not setting that
NSError. When I did, I then got it back in save:, as expected.
Apparently, if -validateForInsert: returns NO, save: simply passes on
whatever error it gets, or doesn't get. Not ideal behavior, but not a
bug. Something like, "You didn't give me an error in -
validateForInsert:, Stupid" would be better.
Thanks,
Jerry
_______________________________________________
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