aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PostgresKit/Source/FLXPostgresConnectionQueryExecution.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/FLXPostgresConnectionQueryExecution.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/FLXPostgresConnectionQueryExecution.m')
-rw-r--r--Frameworks/PostgresKit/Source/FLXPostgresConnectionQueryExecution.m11
1 files changed, 5 insertions, 6 deletions
diff --git a/Frameworks/PostgresKit/Source/FLXPostgresConnectionQueryExecution.m b/Frameworks/PostgresKit/Source/FLXPostgresConnectionQueryExecution.m
index 894338a7..79951f59 100644
--- a/Frameworks/PostgresKit/Source/FLXPostgresConnectionQueryExecution.m
+++ b/Frameworks/PostgresKit/Source/FLXPostgresConnectionQueryExecution.m
@@ -24,11 +24,12 @@
#import "FLXPostgresConnectionPrivateAPI.h"
#import "FLXPostgresConnectionTypeHandling.h"
#import "FLXPostgresConnectionDelegate.h"
+#import "FLXPostgresTypeHandlerProtocol.h"
#import "FLXPostgresConnection.h"
#import "FLXPostgresException.h"
#import "FLXPostgresResult.h"
-#import "FLXPostgresTypeHandlerProtocol.h"
#import "FLXPostgresStatement.h"
+#import "FLXPostgresError.h"
// Constants
static int FLXPostgresResultsAsBinary = 1;
@@ -249,12 +250,10 @@ FLXQueryParamData;
{
ExecStatusType status = PQresultStatus(result);
- if (status == PGRES_BAD_RESPONSE || status == PGRES_FATAL_ERROR) {
- NSString *error = [NSString stringWithUTF8String:PQresultErrorMessage(result)];
-
- if (_lastErrorMessage) [_lastErrorMessage release], _lastErrorMessage = nil;
+ if (status == PGRES_BAD_RESPONSE || status == PGRES_FATAL_ERROR) {
+ if (_lastError) [_lastError release], _lastError = nil;
- _lastErrorMessage = [[NSString alloc] initWithString:error];
+ _lastError = [[FLXPostgresError alloc] initWithResult:result];
PQclear(result);