Re: Core Data Persistent Store Corrupted
Re: Core Data Persistent Store Corrupted
- Subject: Re: Core Data Persistent Store Corrupted
- From: Jerry Krinock <email@hidden>
- Date: Sat, 20 Jun 2009 05:43:54 -0700
On 2009 Jun 17, at 05:43, Vladislav Struhar wrote:
I'm using Core Data model with NSBinaryStoreType persistent store.
Wow. I've never seen that actually used in real life.
After a long time of using this with no issues, I have encountered
an error:
"The file could not be opened because it is not in the right format."
File is about 1MB size. Do you know what might be the cause of
this? Is there a way to check/repair persistent store file?
No, but I can advise you to remember that NSErrors like that are
generated in response to an unexpected event, and if the unexpected
event was an "unknown unknown" to the person who wrote the code
generating the NSError, the root cause may not be what it says.
I've definitely seen that happen with the message you quoted above.
If I recall correctly, Core Data not finding your managed object model
is one of them. So, take a broader look, beyond just that file.
Also, if you are only seeing that message in a sheet in a window,
you're not getting all of the information. Intercept the NSError by
overriding -willPresentError:, and NSLog its entire userInfo dictionary.
_______________________________________________
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