mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
Previous exception can now be passed to Dibi\Exception constructor (#275)
This commit is contained in:
committed by
David Grudl
parent
3f020be15b
commit
432d0a8f7c
@@ -22,9 +22,9 @@ class Exception extends \Exception
|
|||||||
/**
|
/**
|
||||||
* Construct a dibi exception.
|
* Construct a dibi exception.
|
||||||
*/
|
*/
|
||||||
public function __construct(string $message = '', $code = 0, string $sql = null)
|
public function __construct(string $message = '', $code = 0, string $sql = null, \Throwable $previous = null)
|
||||||
{
|
{
|
||||||
parent::__construct($message);
|
parent::__construct($message, 0, $previous);
|
||||||
$this->code = $code;
|
$this->code = $code;
|
||||||
$this->sql = $sql;
|
$this->sql = $sql;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user