PHP Class yii\db\Exception

Since: 2.0
Author: Qiang Xue ([email protected])
Inheritance: extends yii\base\Exception
Show file Open project: yiisoft/yii2 Class Usage Examples

Public Properties

Property Type Description
$errorInfo the error info provided by a PDO exception. This is the same as returned by PDO::errorInfo.

Public Methods

Method Description
__construct ( string $message, array $errorInfo = [], integer $code, Exception $previous = null ) Constructor.
__toString ( ) : string
getName ( ) : string

Method Details

__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.

__toString() public method

public __toString ( ) : string
return string readable representation of exception

getName() public method

public getName ( ) : string
return string the user-friendly name of this exception

Property Details

$errorInfo public property

the error info provided by a PDO exception. This is the same as returned by PDO::errorInfo.
public $errorInfo