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() を何に置き換えるかについて、私はちょっと途方に暮れています。ユーザーのデバイスがエラーを送り返すことを許可する簡単な方法はないと思います。ここでの標準的な慣行は何ですか?