diff options
Diffstat (limited to 'Frameworks/PostgresKit/Source/FLXPostgresConnectionQueryExecution.m')
-rw-r--r-- | Frameworks/PostgresKit/Source/FLXPostgresConnectionQueryExecution.m | 11 |
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); |