system system.base system.caching system.caching.dependencies system.collections system.console system.db system.db.ar system.db.schema system.db.schema.cubrid system.db.schema.mssql system.db.schema.mysql system.db.schema.oci system.db.schema.pgsql system.db.schema.sqlite system.gii system.i18n system.i18n.gettext system.logging system.test system.utils system.validators system.web system.web.actions system.web.auth system.web.filters system.web.form system.web.helpers system.web.renderers system.web.services system.web.widgets system.web.widgets.captcha system.web.widgets.pagers zii.behaviors zii.widgets zii.widgets.grid zii.widgets.jui

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.

公共属性

隐藏继承的属性

属性类型描述被定义在
errorInfo mixed the error info provided by a PDO exception. CDbException

受保护的属性

隐藏继承的属性

属性类型描述被定义在
code Exception
file Exception
line Exception
message Exception

公共方法

隐藏继承的方法

方法描述被定义在
__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.