我已经在Apple参考提供的示例代码中看到了有关如何处理Core Data错误的信息。即:
NSError *error = nil;
if (![context save:&error]) {
/*
Replace this implementation with code to handle the error appropriately.
abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button.
*/
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
但从来没有的你怎么什么例子应该实现它。
是否有人有(或可以向我指出)一些说明上述方法的实际“生产”代码。
预先感谢,马特