mirror of
https://github.com/dg/dibi.git
synced 2025-08-04 21:28:02 +02:00
Previous exception can now be passed to Dibi\Exception constructor (#276)
This commit is contained in:
committed by
David Grudl
parent
22ac601502
commit
67521084d9
@@ -22,10 +22,11 @@ class Exception extends \Exception
|
|||||||
* @param string Message describing the exception
|
* @param string Message describing the exception
|
||||||
* @param mixed
|
* @param mixed
|
||||||
* @param string SQL command
|
* @param string SQL command
|
||||||
|
* @param \Exception
|
||||||
*/
|
*/
|
||||||
public function __construct($message = '', $code = 0, $sql = null)
|
public function __construct($message = '', $code = 0, $sql = null, \Exception $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