我在苹果提供的示例代码中看到应该如何处理核心数据错误。即:iPhone核心数据“生产”错误处理
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();
}
但从来没有一个如何应该实现它的任何实例。
有没有人有(或可以指向我的方向)一些实际的“生产”代码,说明上述方法。
由于提前, 马特
+1这是一个很好的问题。 –