我的 iPhone 应用程序中有很多地方是这样的:
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();
}
对于在生产应用程序中实际替换 abort() 的内容,我有点不知所措。我认为没有任何简单的方法可以让用户的设备将错误发回给您。这里的标准做法是什么?