aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-04-04 13:39:30 +0000
committerstuconnolly <stuart02@gmail.com>2010-04-04 13:39:30 +0000
commit7a19eb3b7726df13e8423e7a485becf3b6ba3b9d (patch)
tree1624d68f1c4a561b7393e4d4306f7e105569573e
parentc67695c10a6c6f8fb3b23ba6bffd5e5d79417623 (diff)
downloadsequelpro-7a19eb3b7726df13e8423e7a485becf3b6ba3b9d.tar.gz
sequelpro-7a19eb3b7726df13e8423e7a485becf3b6ba3b9d.tar.bz2
sequelpro-7a19eb3b7726df13e8423e7a485becf3b6ba3b9d.zip
Don't append a semi-colon to console messages that are errors.
-rw-r--r--Source/SPQueryController.m9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m
index d34655e7..e1c85e68 100644
--- a/Source/SPQueryController.m
+++ b/Source/SPQueryController.m
@@ -941,8 +941,15 @@ static SPQueryController *sharedQueryController = nil;
*/
- (void)_addMessageToConsole:(NSString *)message connection:(NSString *)connection isError:(BOOL)error
{
- SPConsoleMessage *consoleMessage = [SPConsoleMessage consoleMessageWithMessage:[[[message stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] stringByReplacingOccurrencesOfString:@"\n" withString:@" "] stringByAppendingString:@";"] date:[NSDate date] connection:connection];
+ NSString *messageTemp = [[message stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] stringByReplacingOccurrencesOfString:@"\n" withString:@" "];
+
+ // Only append a semi-colon (;) if the supplied message is not an error
+ if (!error) {
+ messageTemp = [messageTemp stringByAppendingString:@";"];
+ }
+ SPConsoleMessage *consoleMessage = [SPConsoleMessage consoleMessageWithMessage:messageTemp date:[NSDate date] connection:connection];
+
[consoleMessage setIsError:error];
[messagesFullSet addObject:consoleMessage];