aboutsummaryrefslogtreecommitdiffstats
path: root/Source/MGTemplateEngine.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-01-19 14:21:24 +0000
committerBibiko <bibiko@eva.mpg.de>2011-01-19 14:21:24 +0000
commitc27e06e95d403f6100b4386487a83a466cf696bc (patch)
treeb3ef9874e356d3d8ce89e71a2f4d6a4bc678533a /Source/MGTemplateEngine.m
parent6e2a43045f6f98c4fabf5a3358c2bdfdda2d6688 (diff)
downloadsequelpro-c27e06e95d403f6100b4386487a83a466cf696bc.tar.gz
sequelpro-c27e06e95d403f6100b4386487a83a466cf696bc.tar.bz2
sequelpro-c27e06e95d403f6100b4386487a83a466cf696bc.zip
• fixed NSLocalizedString error while compiling (genstring) in MGTemplateEngine.m
- comment shouldn't be nil
Diffstat (limited to 'Source/MGTemplateEngine.m')
-rw-r--r--Source/MGTemplateEngine.m14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/MGTemplateEngine.m b/Source/MGTemplateEngine.m
index 86068b66..89ea3a1d 100644
--- a/Source/MGTemplateEngine.m
+++ b/Source/MGTemplateEngine.m
@@ -177,10 +177,16 @@
- (void)reportError:(NSString *)errorStr code:(NSInteger)code continuing:(BOOL)continuing
{
if (delegate) {
- NSString *errStr = NSLocalizedString(errorStr, nil);
- if (!continuing) {
- errStr = [NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"Fatal Error", nil), errStr];
- }
+
+ NSString *errStr;
+ if(errorStr)
+ errStr = [NSString stringWithString:errorStr];
+ else
+ errStr = NSLocalizedString(@"MGTemplateEngine Error", @"mgtemplateengine error");
+
+ if (!continuing)
+ errStr = [NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"Fatal Error", @"fatal error"), errStr];
+
SEL selector = @selector(templateEngine:encounteredError:isContinuing:);
if ([(NSObject *)delegate respondsToSelector:selector]) {
NSError *error = [NSError errorWithDomain:TEMPLATE_ENGINE_ERROR_DOMAIN