Class yii\db\Exception
Inheritance | yii\db\Exception » yii\base\Exception » Exception |
---|---|
Subclasses | yii\db\IntegrityException, yii\db\StaleObjectException |
Available since version | 2.0 |
Source Code | https://github.com/yiisoft/yii2/blob/master/framework/db/Exception.php |
Exception represents an exception that is caused by some DB-related operations.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$errorInfo | array | The error info provided by a PDO exception. | yii\db\Exception |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Constructor. | yii\db\Exception |
__toString() | yii\db\Exception | |
getName() | yii\db\Exception |
Property Details
The error info provided by a PDO exception. This is the same as returned by PDO::errorInfo.
Method Details
Constructor.
public void __construct ( $message, $errorInfo = [], $code = '', $previous = null ) | ||
$message | string | PDO error message |
$errorInfo | array | PDO error info |
$code | string | PDO error code |
$previous | Throwable|Exception | The previous exception used for the exception chaining. |
public string __toString ( ) | ||
return | string | Readable representation of exception |
---|
public string getName ( ) | ||
return | string | The user-friendly name of this exception |
---|
Signup or Login in order to comment.