aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPAppController.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-01-13 10:51:41 +0000
committerBibiko <bibiko@eva.mpg.de>2011-01-13 10:51:41 +0000
commitae9a0c3c701429a6e0cd379245a4690e1933818a (patch)
treecb9bfdc4fda003fec5b56a1955211690ee80a3c2 /Source/SPAppController.m
parent82fefc621680e1a3a7721b159239595364bd5e55 (diff)
downloadsequelpro-ae9a0c3c701429a6e0cd379245a4690e1933818a.tar.gz
sequelpro-ae9a0c3c701429a6e0cd379245a4690e1933818a.tar.bz2
sequelpro-ae9a0c3c701429a6e0cd379245a4690e1933818a.zip
• improved error handling for sequelpro URL scheme commands
Diffstat (limited to 'Source/SPAppController.m')
-rw-r--r--Source/SPAppController.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index 7f405dba..3a381fdb 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -767,9 +767,30 @@ YY_BUFFER_STATE yy_scan_string (const char *);
} else {
SPBeginAlertSheet(NSLocalizedString(@"sequelpro URL Scheme Error", @"sequelpro url Scheme Error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], self, nil, nil,
[NSString stringWithFormat:@"%@ “%@”:\n%@", NSLocalizedString(@"Error for", @"error for message"), [command description], NSLocalizedString(@"sequelpro URL scheme command not supported.", @"sequelpro URL scheme command not supported.")]);
+
+ // If command failed notify the file handle hand shake mechanism
+ NSString *out = @"1";
+ NSString *anUUID = @"";
+ if(command && passedProcessID && [passedProcessID length])
+ anUUID = passedProcessID;
+ else
+ anUUID = command;
+ [out writeToFile:[NSString stringWithFormat:@"%@%@", SPURLSchemeQueryResultStatusPathHeader, anUUID]
+ atomically:YES
+ encoding:NSUTF8StringEncoding
+ error:nil];
+
+ out = @"Error";
+ [out writeToFile:[NSString stringWithFormat:@"%@%@", SPURLSchemeQueryResultPathHeader, anUUID]
+ atomically:YES
+ encoding:NSUTF8StringEncoding
+ error:nil];
+
}
+
return;
+
}
if(passedProcessID && [passedProcessID length]) {