yii\db\Exception::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $message, array $errorInfo = [], integer $code, Exception $previous = null )
$message string PDO error message
$errorInfo array PDO error info
$code integer PDO error code
$previous Exception The previous exception used for the exception chaining.
    public function __construct($message, $errorInfo = [], $code = 0, \Exception $previous = null)
    {
        $this->errorInfo = $errorInfo;
        parent::__construct($message, $code, $previous);
    }