Re: Core Data debugging
Re: Core Data debugging
- Subject: Re: Core Data debugging
- From: Fritz Anderson <email@hidden>
- Date: Tue, 14 Jul 2009 22:01:47 -0500
On 14 Jul 2009, at 5:14 PM, email@hidden wrote:
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 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".
Inspecting the instance variables of an NSError (or any other Cocoa
object, for that matter) won't likely get you very far.
Using the debugger, step past the save:, then type "po err" at the
debugger console. That will get you a human-readable summary of the
error, but not enough detail. However, that summary will include the
address of the NSError's userInfo dictionary. Say the address is
0x123456; type "po (id)0x123456" into the console. You will be
presented with a dump of the dictionary, from which you can (probably)
glean the details of what went wrong.
(You might have a look into your mail client; it's inserting a
distracting amount of extraneous white space.)
— F
--
Fritz Anderson -- Xcode 3 Unleashed: Now in its second printing -- <http://x3u.manoverboard.org/
>
_______________________________________________
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