mirror of
https://github.com/dg/dibi.git
synced 2025-08-07 22:56:35 +02:00
* new exceptions: BadMethodCallException, InvalidArgumentException
* DibiMySqlDriver, DibiMySqliDriver, DibiSqliteDriver, DibiOracleDriver: error checking instead of FALSE checking in doQuery
This commit is contained in:
@@ -79,9 +79,8 @@ class DibiSqliteDriver extends DibiDriver
|
||||
$connection = $this->getConnection();
|
||||
$res = @sqlite_query($connection, $sql, SQLITE_ASSOC);
|
||||
|
||||
if ($res === FALSE) {
|
||||
$code = sqlite_last_error($connection);
|
||||
throw new DibiDatabaseException(sqlite_error_string($code), $code, $sql);
|
||||
if ($errno = sqlite_last_error($connection)) {
|
||||
throw new DibiDatabaseException(sqlite_error_string($errno), $errno, $sql);
|
||||
}
|
||||
|
||||
return is_resource($res) ? new DibiSqliteResult($res) : TRUE;
|
||||
@@ -158,7 +157,7 @@ class DibiSqliteDriver 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