1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-06 14:16:39 +02:00

- removed NException, ability of catching PHP error moved to DibiDriverException

This commit is contained in:
David Grudl
2008-03-04 14:01:22 +00:00
parent 1459c6c95d
commit 2632953541
8 changed files with 125 additions and 162 deletions

View File

@@ -127,13 +127,15 @@ class DibiSqliteDriver extends NObject implements IDibiDriver
*/
public function query($sql)
{
DibiDriverException::catchError();
DibiDriverException::tryError();
if ($this->buffered) {
$this->resultset = sqlite_query($this->connection, $sql);
} else {
$this->resultset = sqlite_unbuffered_query($this->connection, $sql);
}
DibiDriverException::restore();
if (DibiDriverException::catchError($msg)) {
throw new DibiDriverException($msg, sqlite_last_error($this->connection), $sql);
}
return is_resource($this->resultset);
}