Error are not reported due to $this->connected() call

Due to the fact that the

$this->errorNum = (int) mysql_errno($this->connection);
$this->errorMsg = (string) mysql_error($this->connection) . ' SQL=' . $query;

was after the call to if (!$this->connected())
then the error message was empty because it contains the result of the $this->connected() call.

See bugtracker 33185
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_id=8103&tracker_item_id=33185