Public Member Functions | |
__construct ($msg, $native=null, $userinfo=null) | |
Constructs a SQLException. | |
setUserInfo ($info) | |
Sets additional user / debug information for this error. | |
getUserInfo () | |
Returns the additional / debug information for this error. | |
setNativeError ($msg) | |
Sets driver native error message. | |
getNativeError () | |
Gets driver native error message. | |
toString () | |
Protected Attributes | |
$userInfo | |
Information that provides additional information for context of Exception (e.g. | |
$nativeError | |
Native RDBMS error string. |
Definition at line 29 of file SQLException.php.
SQLException::__construct | ( | $ | msg, | |
$ | native = null , |
|||
$ | userinfo = null | |||
) |
Constructs a SQLException.
string | $msg Error message | |
string | $native Native DB error message. | |
string | $userinfo More info, e.g. the SQL statement or the connection string that caused the error. |
Definition at line 43 of file SQLException.php.
References setNativeError(), and setUserInfo().
00044 { 00045 parent::__construct($msg); 00046 if ($native !== null) { 00047 $this->setNativeError($native); 00048 } 00049 if ($userinfo !== null) { 00050 $this->setUserInfo($userinfo); 00051 } 00052 }
SQLException::getNativeError | ( | ) |
SQLException::getUserInfo | ( | ) |
Returns the additional / debug information for this error.
Definition at line 71 of file SQLException.php.
SQLException::setNativeError | ( | $ | msg | ) |
Sets driver native error message.
string | $info |
Definition at line 82 of file SQLException.php.
Referenced by __construct().
00083 { 00084 $this->nativeError = $msg; 00085 $this->message .= " [Native Error: " .$this->nativeError . "]"; 00086 }
SQLException::setUserInfo | ( | $ | info | ) |
Sets additional user / debug information for this error.
array | $info |
Definition at line 60 of file SQLException.php.
Referenced by __construct(), and Creole::getConnection().
00061 { 00062 $this->userInfo = $info; 00063 $this->message .= " [User Info: " .$this->userInfo . "]"; 00064 }
SQLException::toString | ( | ) |
Definition at line 101 of file SQLException.php.
SQLException::$nativeError [protected] |
SQLException::$userInfo [protected] |
Information that provides additional information for context of Exception (e.g.
SQL statement or DSN).
Definition at line 32 of file SQLException.php.