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

Previous exception can now be passed to Dibi\Exception constructor (#276)

This commit is contained in:
Korney Czukowski
2018-02-16 14:12:33 +01:00
committed by David Grudl
parent 22ac601502
commit 67521084d9

View File

@@ -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;
} }