__construct() public méthode

DbException constructor.
public __construct ( string $message, array $config, string $sql, integer $code = 10500 )
$message string
$config array
$sql string
$code integer
Exemple #1
0
 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);
 }