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:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user