This commit is contained in:
parent
26141db6fe
commit
b228cf616d
@ -54,13 +54,12 @@ class Doctrine_Connection_Mssql_Exception extends Doctrine_Connection_Exception
|
|||||||
/**
|
/**
|
||||||
* This method checks if native error code/message can be
|
* This method checks if native error code/message can be
|
||||||
* converted into a portable code and then adds this
|
* converted into a portable code and then adds this
|
||||||
* portable error code to errorInfo array and returns the modified array
|
* portable error code to $portableCode field
|
||||||
*
|
|
||||||
* the portable error code is added at the end of array
|
|
||||||
*
|
*
|
||||||
* @param array $errorInfo error info array
|
* @param array $errorInfo error info array
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
* @return array
|
* @return boolean whether or not the error info processing was successfull
|
||||||
|
* (the process is successfull if portable error code was found)
|
||||||
*/
|
*/
|
||||||
public function processErrorInfo(array $errorInfo) {
|
public function processErrorInfo(array $errorInfo) {
|
||||||
$code = $errorInfo[1];
|
$code = $errorInfo[1];
|
||||||
|
@ -64,19 +64,19 @@ class Doctrine_Connection_Mysql_Exception extends Doctrine_Connection_Exception
|
|||||||
/**
|
/**
|
||||||
* This method checks if native error code/message can be
|
* This method checks if native error code/message can be
|
||||||
* converted into a portable code and then adds this
|
* converted into a portable code and then adds this
|
||||||
* portable error code to errorInfo array and returns the modified array
|
* portable error code to $portableCode field
|
||||||
*
|
|
||||||
* the portable error code is added at the end of array
|
|
||||||
*
|
*
|
||||||
* @param array $errorInfo error info array
|
* @param array $errorInfo error info array
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
* @return array
|
* @return boolean whether or not the error info processing was successfull
|
||||||
|
* (the process is successfull if portable error code was found)
|
||||||
*/
|
*/
|
||||||
public function processErrorInfo(array $errorInfo) {
|
public function processErrorInfo(array $errorInfo) {
|
||||||
$code = $errorInfo[1];
|
$code = $errorInfo[1];
|
||||||
if(isset(self::$errorCodeMap[$code]))
|
if(isset(self::$errorCodeMap[$code])) {
|
||||||
$errorInfo[3] = self::$errorCodeMap[$code];
|
$this->portableCode = self::$errorCodeMap[$code];
|
||||||
|
return true;
|
||||||
return $errorInfo;
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user