From 67521084d90d5abbed95f0257b0a614ad93c0037 Mon Sep 17 00:00:00 2001 From: Korney Czukowski Date: Fri, 16 Feb 2018 14:12:33 +0100 Subject: [PATCH] Previous exception can now be passed to Dibi\Exception constructor (#276) --- src/Dibi/exceptions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Dibi/exceptions.php b/src/Dibi/exceptions.php index fddf3344..beb1dba7 100644 --- a/src/Dibi/exceptions.php +++ b/src/Dibi/exceptions.php @@ -22,10 +22,11 @@ class Exception extends \Exception * @param string Message describing the exception * @param mixed * @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->sql = $sql; }