Skip to content

Commit

Permalink
[FIX] Log fetch-request-wrapper errors to NSLog on iPhone since it la…
Browse files Browse the repository at this point in the history
…cks -[NSApp presentError:].
  • Loading branch information
rentzsch committed Oct 17, 2009
1 parent 1861c92 commit caf3732
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/machine.m.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@
NSError *error = nil;
id result = [self fetch<$FetchRequest.name.initialCapitalString$>:moc_ <$foreach Binding FetchRequest.bindings do2$><$Binding.name$>:<$Binding.name$>_<$endforeach do2$> error:&error];
if (error) {
#if TARGET_OS_IPHONE
NSLog(@"error: %@", error);
#else
[NSApp presentError:error];
#endif
}
return result;
}
Expand Down Expand Up @@ -130,7 +134,11 @@
NSError *error = nil;
NSArray *result = [self fetch<$FetchRequest.name.initialCapitalString$>:moc_ <$foreach Binding FetchRequest.bindings do2$><$Binding.name$>:<$Binding.name$>_<$endforeach do2$> error:&error];
if (error) {
#if TARGET_OS_IPHONE
NSLog(@"error: %@", error);
#else
[NSApp presentError:error];
#endif
}
return result;
}
Expand Down

0 comments on commit caf3732

Please sign in to comment.