CDbException

Package system.db
Inheritance class CDbException » CException » Exception
Since 1.0
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
__wakeup() 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#33 (show)
public function __construct($message,$code=0,$errorInfo=null)
{
    
$this->errorInfo=$errorInfo;
    
parent::__construct($message,$code);
}

Constructor.

© 2008–2017 by Yii Software LLC
Licensed under the three clause BSD license.
http://www.yiiframework.com/doc/api/1.1/CDbException