public function __construct(\PDOException $exception, array $config, $sql, $code = 10501) { $error = $exception->errorInfo; $this->setData('PDO Error Info', ['SQLSTATE' => $error[0], 'Driver Error Code' => $error[1], 'Driver Error Message' => isset($error[2]) ? $error[2] : '']); parent::__construct($exception->getMessage(), $config, $sql, $code); }
public function __construct($message, $config, $sql, $bind, $code = 10502) { $this->setData('Bind Param', $bind); parent::__construct($message, $config, $sql, $code); }