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: Chris Hanson <email@hidden>
- Date: Fri, 23 Nov 2007 22:38:51 -0800
On Nov 23, 2007, at 9:47 PM, Jerry Krinock wrote:
What I am sure about is that, as per the code in my original post,
although I was giving -save: an NSError**, it was returning NO, my
store file on the disk was not touched, and the NSError* was nil.
If it ever happens again, I'll test more closely and let you know.
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?
You should *never* rely on an output NSError argument being set to a
non-nil as a sign of an error; you should *always* check the actual
result of the method or function, and only look at the returned
NSError after that. However, it's still a serious bug for any API
that takes an output NSError parameter to fail without returning a
corresponding NSError, and it would be worth pursuing.
Thanks!
-- Chris
_______________________________________________
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