mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
used NotSupportedException at appropriate places
This commit is contained in:
@@ -51,12 +51,12 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
||||
|
||||
|
||||
/**
|
||||
* @throws DibiException
|
||||
* @throws NotSupportedException
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if (!extension_loaded('sqlite')) {
|
||||
throw new DibiDriverException("PHP extension 'sqlite' is not loaded.");
|
||||
throw new NotSupportedException("PHP extension 'sqlite' is not loaded.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
||||
public function getRowCount()
|
||||
{
|
||||
if (!$this->buffered) {
|
||||
throw new DibiDriverException('Row count is not available for unbuffered queries.');
|
||||
throw new NotSupportedException('Row count is not available for unbuffered queries.');
|
||||
}
|
||||
return sqlite_num_rows($this->resultSet);
|
||||
}
|
||||
@@ -366,7 +366,7 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
||||
public function seek($row)
|
||||
{
|
||||
if (!$this->buffered) {
|
||||
throw new DibiDriverException('Cannot seek an unbuffered result set.');
|
||||
throw new NotSupportedException('Cannot seek an unbuffered result set.');
|
||||
}
|
||||
return sqlite_seek($this->resultSet, $row);
|
||||
}
|
||||
|
Reference in New Issue
Block a user