aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-10-01 02:24:18 +0200
committerMax <post@wickenrode.com>2015-10-01 02:24:18 +0200
commit730f1d66bee8532d35f7f52ddafb3dfbed427876 (patch)
treebf61751d393cde050ad47609844c74946cb0e0af
parent62acd195d1fe1ca3a586e2b88ca5710b09dbb461 (diff)
downloadsequelpro-730f1d66bee8532d35f7f52ddafb3dfbed427876.tar.gz
sequelpro-730f1d66bee8532d35f7f52ddafb3dfbed427876.tar.bz2
sequelpro-730f1d66bee8532d35f7f52ddafb3dfbed427876.zip
Add some debug code for an exception I haven't seen before
-rw-r--r--Source/SPExportController.m10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/SPExportController.m b/Source/SPExportController.m
index 97840171..b249505a 100644
--- a/Source/SPExportController.m
+++ b/Source/SPExportController.m
@@ -417,8 +417,14 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled";
[panel setDirectoryURL:[NSURL URLWithString:[exportPathField stringValue]]];
[panel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger returnCode) {
if (returnCode == NSOKButton) {
- [exportPathField setStringValue:[[panel directoryURL] path]];
- [prefs setObject:[[panel directoryURL] path] forKey:SPExportLastDirectory];
+ NSString *path = [[panel directoryURL] path];
+ if(!path) {
+ @throw [NSException exceptionWithName:NSInternalInconsistencyException
+ reason:[NSString stringWithFormat:@"File panel ended with OK, but returned nil for path!? directoryURL=%@,isFileURL=%d",[panel directoryURL],[[panel directoryURL] isFileURL]]
+ userInfo:nil];
+ }
+ [exportPathField setStringValue:path];
+ [prefs setObject:path forKey:SPExportLastDirectory];
}
}];
}