aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PostgresKit/Source/FLXPostgresConnection.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-09-03 10:53:23 +0000
committerstuconnolly <stuart02@gmail.com>2012-09-03 10:53:23 +0000
commite4c3ec208cde23fb73edeb9db69a7f65a36d9fd4 (patch)
treebde9d19f9aff9e73724c8be9bb42e4b7630cd226 /Frameworks/PostgresKit/Source/FLXPostgresConnection.m
parente124a1d0fb576c311a6ac601b1c08e6ce51bcd30 (diff)
downloadsequelpro-e4c3ec208cde23fb73edeb9db69a7f65a36d9fd4.tar.gz
sequelpro-e4c3ec208cde23fb73edeb9db69a7f65a36d9fd4.tar.bz2
sequelpro-e4c3ec208cde23fb73edeb9db69a7f65a36d9fd4.zip
PostgresKit: set the last error to be an instance of FLXPostgresError not a string.
Diffstat (limited to 'Frameworks/PostgresKit/Source/FLXPostgresConnection.m')
-rw-r--r--Frameworks/PostgresKit/Source/FLXPostgresConnection.m10
1 files changed, 4 insertions, 6 deletions
diff --git a/Frameworks/PostgresKit/Source/FLXPostgresConnection.m b/Frameworks/PostgresKit/Source/FLXPostgresConnection.m
index 3bd24bb2..aed73ddf 100644
--- a/Frameworks/PostgresKit/Source/FLXPostgresConnection.m
+++ b/Frameworks/PostgresKit/Source/FLXPostgresConnection.m
@@ -75,7 +75,7 @@ static void _FLXPostgresConnectionNoticeProcessor(void *arg, const char *message
@synthesize useKeepAlive = _useKeepAlive;
@synthesize keepAliveInterval = _keepAliveInterval;
@synthesize lastQueryWasCancelled = _lastQueryWasCancelled;
-@synthesize lastErrorMessage = _lastErrorMessage;
+@synthesize lastError = _lastError;
@synthesize encoding = _encoding;
@synthesize stringEncoding = _stringEncoding;
@synthesize parameters = _parameters;
@@ -107,8 +107,8 @@ static void _FLXPostgresConnectionNoticeProcessor(void *arg, const char *message
_useKeepAlive = YES;
_keepAliveInterval = FLXPostgresConnectionDefaultKeepAlive;
+ _lastError = nil;
_connection = nil;
- _lastErrorMessage = nil;
_lastQueryWasCancelled = NO;
_stringEncoding = FLXPostgresConnectionDefaultStringEncoding;
@@ -343,9 +343,7 @@ static void _FLXPostgresConnectionNoticeProcessor(void *arg, const char *message
BOOL success = [_parameters loadParameters];
- if (!success) {
- NSLog(@"PostgresKit: Warning: Failed to load database parameters.");
- }
+ if (!success) NSLog(@"PostgresKit: Warning: Failed to load database parameters.");
}
/**
@@ -451,8 +449,8 @@ static void _FLXPostgresConnectionNoticeProcessor(void *arg, const char *message
if (_connectionParamNames) free(_connectionParamNames);
if (_connectionParamValues) free(_connectionParamValues);
+ if (_lastError) [_lastError release], _lastError = nil;
if (_parameters) [_parameters release], _parameters = nil;
- if (_lastErrorMessage) [_lastErrorMessage release], _lastErrorMessage = nil;
[super dealloc];
}