Core Data debugging
Core Data debugging
- Subject: Core Data debugging
- From: email@hidden
- Date: Tue, 14 Jul 2009 18:14:26 -0400
Hello,
I am writing a CoreData based application. I am creating Managed Objects and then saving them with by sending the save message to the context thus:
NSError *err;
BOOL result = [moc save: &err];
The problem is that every time I call this method the result is NO implying a failure when saving.
The data though appears in a table (which displays the data) and I see an XML file created with the data in it.
(I am using an XML based data repository during development. I am changing the data model sometimes but in these cases I am deleting the store file before starting the application so that a fresh XML file is created).
The issue for this post is that when I try to examine the NSError object it is invalid. The NSError is being created as the debugger shows an address for the object but its field are not set. Specifically the _code field had a variable value implying it was not specifically set, and the?_domain field was "Invalid".
I haven't been able to find another approach here. I looked at Instruments but the CoreData instruments seemed to look at data cache usage, etc, not really of help for my current problem. So:
How do I find out what the real issue is?
Is this lack of error reporting a bug/shortcoming of CoreData? Or of my code?
Are there other approaches to debugging here?
Thank you.
Tim Mowlem
_______________________________________________
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