Commits

Tuukka Norri committed e8c1c0d

Arbitrary SQL query methods now set errors properly

  • Participants
  • Parent commits aadd541

Comments (0)

Files changed (1)

File Sources/BXPGInterface.m

 	if (YES == [res querySucceeded])
 		retval = [res resultAsArray];
 	else
-	{
-        //FIXME: reason for error!
-		*error = [BXError errorWithDomain: kBXErrorDomain
-									 code: kBXErrorUnsuccessfulQuery
-								 userInfo: nil];
-	}
+		*error = [mContext packQueryError: [res error]];
 	
 error:
 	return retval;
 	if (YES == [res querySucceeded])
 		retval = [res numberOfRowsAffectedByCommand];
 	else
-	{
-        //FIXME: reason for error?
-		*error = [BXError errorWithDomain: kBXErrorDomain
-									 code: kBXErrorUnsuccessfulQuery
-								 userInfo: nil];		
-	}
+		*error = [mContext packQueryError: [res error]];
 	
 error:
 	return retval;