1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-04 05:07:36 +02:00

Dibi\Exception: code can be string

This commit is contained in:
David Grudl
2015-10-13 18:05:31 +02:00
parent e849be486f
commit 6994f6d11a

View File

@@ -15,19 +15,20 @@ class Exception extends \Exception
{ {
use Strict; use Strict;
/** @var string */ /** @var string|NULL */
private $sql; private $sql;
/** /**
* Construct a dibi exception. * Construct a dibi exception.
* @param string Message describing the exception * @param string Message describing the exception
* @param int Some code * @param mixed
* @param string SQL command * @param string SQL command
*/ */
public function __construct($message = NULL, $code = 0, $sql = NULL) public function __construct($message = NULL, $code = 0, $sql = NULL)
{ {
parent::__construct($message, (int) $code); parent::__construct($message);
$this->code = $code;
$this->sql = $sql; $this->sql = $sql;
} }
@@ -83,11 +84,13 @@ class PcreException extends \Exception
class NotImplementedException extends Exception class NotImplementedException extends Exception
{} {
}
class NotSupportedException extends Exception class NotSupportedException extends Exception
{} {
}
/** /**