aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableData.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-02-03 12:46:23 +0000
committerBibiko <bibiko@eva.mpg.de>2010-02-03 12:46:23 +0000
commit7567724b1e66bc394bf36c7d7b153dd048018f03 (patch)
tree96b260fe3609d82f72705b7b164f8a3e64a5e41c /Source/SPTableData.m
parentc9e9a6a1c8d8c9d0e40a45a2ce2d5d95cf1dafba (diff)
downloadsequelpro-7567724b1e66bc394bf36c7d7b153dd048018f03.tar.gz
sequelpro-7567724b1e66bc394bf36c7d7b153dd048018f03.tar.bz2
sequelpro-7567724b1e66bc394bf36c7d7b153dd048018f03.zip
• improved error handling in Structure View for adding/renaming/removing a field if the actual underlying table doesn't exit anymore; now it informs the user, clean the view, and reloads the Table List
• improved error handling in Content View for refreshing data for the current table if the table doesn't exist anymore - this fix and the fix in [TableContent setCompareTypes:] to check for valid table data removes some NSPlaceholderString and NSScanner warnings
Diffstat (limited to 'Source/SPTableData.m')
-rw-r--r--Source/SPTableData.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/SPTableData.m b/Source/SPTableData.m
index 9dffd962..2c6136a3 100644
--- a/Source/SPTableData.m
+++ b/Source/SPTableData.m
@@ -336,6 +336,10 @@
nil, nil, [NSApp mainWindow], self, nil, nil, nil,
[NSString stringWithFormat:NSLocalizedString(@"An error occurred while retrieving the information for table '%@'. Please try again.\n\nMySQL said: %@", @"error retrieving table information informative message"),
tableName, [mySQLConnection getLastErrorMessage]]);
+ // If the current table doesn't exist anymore reload table list
+ if([mySQLConnection getLastErrorID] == 1146) {
+ [tableListInstance updateTables:nil];
+ }
}
return nil;