1
0
mirror of https://github.com/dg/dibi.git synced 2025-10-20 17:32:50 +02:00

* new exceptions: BadMethodCallException, InvalidArgumentException

* DibiMySqlDriver, DibiMySqliDriver, DibiSqliteDriver, DibiOracleDriver: error checking instead of FALSE checking in doQuery
This commit is contained in:
David Grudl
2007-11-08 03:32:37 +00:00
parent 453cc9be13
commit 25fa4293fc
12 changed files with 34 additions and 47 deletions

View File

@@ -115,8 +115,8 @@ class DibiMySqlDriver extends DibiDriver
$connection = $this->getConnection();
$res = @mysql_query($sql, $connection);
if ($res === FALSE) {
throw new DibiDatabaseException(mysql_error($connection), mysql_errno($connection), $sql);
if ($errno = mysql_errno($connection)) {
throw new DibiDatabaseException(mysql_error($connection), $errno, $sql);
}
return is_resource($res) ? new DibiMySqlResult($res) : TRUE;
@@ -194,7 +194,7 @@ class DibiMySqlDriver extends DibiDriver
public function getMetaData()
{
throw new DibiException(__METHOD__ . ' is not implemented');
throw new BadMethodCallException(__METHOD__ . ' is not implemented');
}