Skip navigation.
 
mlRe: -[NSManagedObjectContext save:] fails but gives no NSError
FROM : Jerry Krinock
DATE : Fri Nov 23 18:24:49 2007

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*.

Related mailsAuthorDate
ml-[NSManagedObjectContext save:] fails but gives no NSError Jerry Krinock Nov 22, 04:34
mlRe: -[NSManagedObjectContext save:] fails but gives no NSError Jerry Krinock Nov 23, 18:24
mlRe: -[NSManagedObjectContext save:] fails but gives no NSError mmalc crawford Nov 23, 23:46
mlRe: -[NSManagedObjectContext save:] fails but gives no NSError Jerry Krinock Nov 24, 06:47
mlRe: -[NSManagedObjectContext save:] fails but gives no NSError Chris Hanson Nov 24, 07:38
mlRe: -[NSManagedObjectContext save:] fails but gives no NSError Jerry Krinock Dec 5, 02:22