From 7a19eb3b7726df13e8423e7a485becf3b6ba3b9d Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sun, 4 Apr 2010 13:39:30 +0000 Subject: Don't append a semi-colon to console messages that are errors. --- Source/SPQueryController.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Source') 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]; -- cgit v1.2.3