* Construct a database error
* @param IDatabase $db Object which threw the error
* @param string $error A simple error message to be used for debugging
+ * @param \Exception|\Throwable|null $prev Previous exception
*/
- public function __construct( IDatabase $db = null, $error ) {
+ public function __construct( IDatabase $db = null, $error, $prev = null ) {
+ parent::__construct( $error, 0, $prev );
$this->db = $db;
- parent::__construct( $error );
}
}