diff options
author | rowanbeentje <rowan@beent.je> | 2010-03-25 01:13:12 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-03-25 01:13:12 +0000 |
commit | 32e858b26923b371a93e800687a13edf1254e445 (patch) | |
tree | ff2bac08381f0bd54e01c2f3f756c9fe5a2e2507 /Source/SPProcessListController.m | |
parent | 5061643c1bf92a3583e4ede059951e1f17befac9 (diff) | |
download | sequelpro-32e858b26923b371a93e800687a13edf1254e445.tar.gz sequelpro-32e858b26923b371a93e800687a13edf1254e445.tar.bz2 sequelpro-32e858b26923b371a93e800687a13edf1254e445.zip |
- Make [MCPConnection getLastErrorMessage] more consistent by always returning nil if no error occurred (previously a blank string was returned most of the time)
- Add a new (BOOL)[MCPConnection queryErrored] method, changing all error message checks to use it for clarity
Diffstat (limited to 'Source/SPProcessListController.m')
-rw-r--r-- | Source/SPProcessListController.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m index ab0ae931..d655e776 100644 --- a/Source/SPProcessListController.m +++ b/Source/SPProcessListController.m @@ -449,7 +449,7 @@ [connection queryString:[NSString stringWithFormat:@"KILL QUERY %lu", (unsigned long)processId]]; // Check for errors - if (![[connection getLastErrorMessage] isEqualToString:@""]) { + if ([connection queryErrored]) { SPBeginAlertSheet(NSLocalizedString(@"Unable to kill query", @"error killing query message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [self window], self, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"An error occured while attempting to kill the query associated with connection %lu.\n\nMySQL said: %@", @"error killing query informative message"), (unsigned long)processId, [connection getLastErrorMessage]]); } @@ -467,7 +467,7 @@ [connection queryString:[NSString stringWithFormat:@"KILL CONNECTION %lu", (unsigned long)processId]]; // Check for errors - if (![[connection getLastErrorMessage] isEqualToString:@""]) { + if ([connection queryErrored]) { SPBeginAlertSheet(NSLocalizedString(@"Unable to kill connection", @"error killing connection message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [self window], self, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"An error occured while attempting to kill connection %lu.\n\nMySQL said: %@", @"error killing query informative message"), (unsigned long)processId, [connection getLastErrorMessage]]); } |