think\exception\PDOException::__construct PHP Метод

__construct() публичный Метод

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