Doctrine 1.2.4
Doctrine_Connection_Pgsql_Exception Class Reference

Inherits Doctrine_Connection_Exception.

Public Member Functions

 errorMessage ($value=null)
 
 getPortableCode ()
 
 getPortableMessage ()
 
 processErrorInfo (array $errorInfo)
 

Detailed Description

Definition at line 35 of file Exception.php.

Member Function Documentation

Doctrine_Connection_Exception::errorMessage (   $value = null)
inherited

Return a textual error message for a Doctrine error code

Parameters
int|arrayinteger error code, null to get the current error code-message map, or an array with a new error code-message map
Returns
string error message, or false if the error code was not recognized

Definition at line 112 of file Exception.php.

{
return isset(self::$errorMessages[$value]) ?
self::$errorMessages[$value] : self::$errorMessages[Doctrine_Core::ERR];
}
Doctrine_Connection_Exception::getPortableCode ( )
inherited

getPortableCode returns portable error code

Returns
integer portable error code

Definition at line 86 of file Exception.php.

{
return $this->portableCode;
}
Doctrine_Connection_Exception::getPortableMessage ( )
inherited

getPortableMessage returns portable error message

Returns
string portable error message

Definition at line 97 of file Exception.php.

{
return self::errorMessage($this->portableCode);
}
Doctrine_Connection_Pgsql_Exception::processErrorInfo ( array  $errorInfo)

This method checks if native error code/message can be converted into a portable code and then adds this portable error code to $portableCode field

the portable error code is added at the end of array

Parameters
array$errorInfoerror info array
Since
1.0
See Also
Doctrine_Core::ERR_* constants
Doctrine_Connection::$portableCode
Returns
boolean whether or not the error info processing was successfull (the process is successfull if portable error code was found)

Definition at line 98 of file Exception.php.

{
foreach (self::$errorRegexps as $regexp => $code) {
if (preg_match($regexp, $errorInfo[2])) {
$this->portableCode = $code;
return true;
}
}
return false;
}

The documentation for this class was generated from the following file: