mirror of
https://github.com/dg/dibi.git
synced 2025-08-13 01:24:06 +02:00
updated for Nette 2.0 beta: exceptions
This commit is contained in:
@@ -47,12 +47,12 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
||||
|
||||
|
||||
/**
|
||||
* @throws NotSupportedException
|
||||
* @throws DibiNotSupportedException
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if (!extension_loaded('pdo')) {
|
||||
throw new NotSupportedException("PHP extension 'pdo' is not loaded.");
|
||||
throw new DibiNotSupportedException("PHP extension 'pdo' is not loaded.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
||||
return new DibiSqliteReflector($this);
|
||||
|
||||
default:
|
||||
throw new NotSupportedException;
|
||||
throw new DibiNotSupportedException;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
||||
*/
|
||||
public function escapeLike($value, $pos)
|
||||
{
|
||||
throw new NotImplementedException;
|
||||
throw new DibiNotImplementedException;
|
||||
}
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
||||
// intentionally break omitted
|
||||
|
||||
default:
|
||||
throw new NotSupportedException('PDO or driver does not support applying limit or offset.');
|
||||
throw new DibiNotSupportedException('PDO or driver does not support applying limit or offset.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
||||
*/
|
||||
public function seek($row)
|
||||
{
|
||||
throw new NotSupportedException('Cannot seek an unbuffered result set.');
|
||||
throw new DibiNotSupportedException('Cannot seek an unbuffered result set.');
|
||||
}
|
||||
|
||||
|
||||
@@ -449,7 +449,7 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
$row = @$this->resultSet->getColumnMeta($i); // intentionally @
|
||||
if ($row === FALSE) {
|
||||
throw new NotSupportedException('Driver does not support meta data.');
|
||||
throw new DibiNotSupportedException('Driver does not support meta data.');
|
||||
}
|
||||
// PHP < 5.2.3 compatibility
|
||||
// @see: http://php.net/manual/en/pdostatement.getcolumnmeta.php#pdostatement.getcolumnmeta.changelog
|
||||
|
Reference in New Issue
Block a user