Ich habe in dem von Apple bereitgestellten Beispielcode gesehen, wie Sie mit Core Data-Fehlern umgehen sollten. Das heißt:iPhone Core Data "Produktion" Fehlerbehandlung
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();
}
aber nie irgendwelche Beispiele, wie Sie sollte es umzusetzen.
Hat jemand (oder kann mich in Richtung zeigen) einige tatsächliche "Produktion" Code, der die oben genannte Methode veranschaulicht.
Vielen Dank im Voraus, Matt
+1 das ist eine ausgezeichnete Frage. –