CDbException
包 | system.db |
---|---|
继承 | class CDbException » CException » Exception |
实现 | Throwable |
可用自 | 1.0 |
源码 | framework/db/CDbException.php |
CDbException represents an exception that is caused by some DB-related operations.
公共方法
方法 | 描述 | 被定义在 |
---|---|---|
__construct() | Constructor. | CDbException |
__toString() | Exception | |
__wakeup() | Exception | |
getCode() | Exception | |
getFile() | Exception | |
getLine() | Exception | |
getMessage() | Exception | |
getPrevious() | Exception | |
getTrace() | Exception | |
getTraceAsString() | Exception |
属性详情
errorInfo
属性
(自版本 v1.1.4 可用)
public mixed $errorInfo;
the error info provided by a PDO exception. This is the same as returned by PDO::errorInfo.
方法详情
__construct()
方法
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 |
源码: framework/db/CDbException.php#33 (显示)
public function __construct($message,$code=0,$errorInfo=null)
{
$this->errorInfo=$errorInfo;
parent::__construct($message,$code);
}
Constructor.