Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIX] Log fetch-request-wrapper errors to NSLog on iPhone since it la…
…cks -[NSApp presentError:].
  • Loading branch information
rentzsch committed Oct 17, 2009
1 parent 5ff2039 commit 4a83428
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/machine.m.motemplate
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 4a83428

Please sign in to comment.