CDbException
Package | system.db |
---|---|
Inheritance | class CDbException » CException » Exception |
Since | 1.0 |
Version | $Id: CDbException.php 2799 2011-01-01 19:31:13Z qiang.xue $ |
Source Code | framework/db/CDbException.php |
CDbException represents an exception that is caused by some DB-related operations.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
errorInfo | mixed | the error info provided by a PDO exception. | CDbException |
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
code | Exception | ||
file | Exception | ||
line | Exception | ||
message | Exception |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Constructor. | CDbException |
__toString() | Exception | |
getCode() | Exception | |
getFile() | Exception | |
getLine() | Exception | |
getMessage() | Exception | |
getPrevious() | Exception | |
getTrace() | Exception | |
getTraceAsString() | Exception |
Property Details
errorInfo
property
(available since v1.1.4)
public mixed $errorInfo;
the error info provided by a PDO exception. This is the same as returned by PDO::errorInfo.
Method Details
__construct()
method
public void __construct(string $message, integer $code=0, mixed $errorInfo=NULL)
| ||
$message | string | PDO error message |
$code | integer | PDO error code |
$errorInfo | mixed | PDO error info |
Source Code: framework/db/CDbException.php#34 (show)
public function __construct($message,$code=0,$errorInfo=null)
{
$this->errorInfo=$errorInfo;
parent::__construct($message,$code);
}
Constructor.