Guest User

Untitled

a guest
May 26th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. if (![ctx save:&error]) {
  2. NSLog(@"Failed to save to data store: %@", [error localizedDescription]);
  3. NSArray* detailedErrors = [[error userInfo] objectForKey:NSDetailedErrorsKey];
  4. if(detailedErrors != nil && [detailedErrors count] > 0) {
  5. for(NSError* detailedError in detailedErrors) {
  6. NSLog(@" DetailedError: %@", [detailedError userInfo]);
  7. }
  8. } else {
  9. NSLog(@" %@", [error userInfo]);
  10. }
  11. }
Add Comment
Please, Sign In to add comment