Give error instead of throw exception if Vim exe is not in app bundle.

git-svn-id: http://macvim.googlecode.com/svn/trunk@153 96c4425d-ca35-0410-94e5-3396d5c13a8f
This commit is contained in:
Bjorn Winckler
2007-08-17 20:15:33 +00:00
parent 0c5f83c1fe
commit bf2497087e
+11
View File
@@ -154,6 +154,7 @@
[alert runModal];
[alert release];
[NSApp replyToOpenOrPrint:NSApplicationDelegateReplyFailure];
return;
}
@@ -162,6 +163,11 @@
NSString *path = [[NSBundle mainBundle]
pathForAuxiliaryExecutable:@"Vim"];
if (!path) {
NSLog(@"ERROR: Vim executable could not be found inside app bundle!");
[NSApp replyToOpenOrPrint:NSApplicationDelegateReplyFailure];
return;
}
[NSTask launchedTaskWithLaunchPath:path arguments:args];
@@ -287,6 +293,11 @@
NSMutableArray *args = [NSMutableArray arrayWithObject:@"-g"];
NSString *path = [[NSBundle mainBundle]
pathForAuxiliaryExecutable:@"Vim"];
if (!path) {
NSLog(@"ERROR: Vim executable could not be found inside app bundle!");
return;
}
//NSLog(@"Launching a new VimTask...");
[NSTask launchedTaskWithLaunchPath:path arguments:args];