diff options
author | stuconnolly <stuart02@gmail.com> | 2012-09-03 10:53:23 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2012-09-03 10:53:23 +0000 |
commit | e4c3ec208cde23fb73edeb9db69a7f65a36d9fd4 (patch) | |
tree | bde9d19f9aff9e73724c8be9bb42e4b7630cd226 /Frameworks/PostgresKit/Source/FLXPostgresError.m | |
parent | e124a1d0fb576c311a6ac601b1c08e6ce51bcd30 (diff) | |
download | sequelpro-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/FLXPostgresError.m')
-rw-r--r-- | Frameworks/PostgresKit/Source/FLXPostgresError.m | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Frameworks/PostgresKit/Source/FLXPostgresError.m b/Frameworks/PostgresKit/Source/FLXPostgresError.m index 6a0a6210..22394900 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresError.m +++ b/Frameworks/PostgresKit/Source/FLXPostgresError.m @@ -114,10 +114,8 @@ * @return A string representing the error value. The caller is responsible for freeing the associated memory. */ - (NSString *)_extractErrorField:(int)field fromResult:(PGresult *)result -{ - const char *errorData = PQresultErrorField(result, field); - - return [[NSString alloc] initWithBytes:errorData length:strlen(errorData) encoding:NSUTF8StringEncoding]; +{ + return [[NSString alloc] initWithUTF8String:PQresultErrorField(result, field)]; } #pragma mark - |