diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Ldap/Exception.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Ldap/Exception.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,172 @@ +getLastError($code, $errorMessages) . ': '; + if ($code === 0) { + $message = ''; + $code = $oldCode; + } + } + if (empty($message)) { + if ($code > 0) { + $message = '0x' . dechex($code) . ': '; + } + } + + if (!empty($str)) { + $message .= $str; + } else { + $message .= 'no exception message'; + } + + parent::__construct($message, $code); + } + + + /** + * @deprecated not necessary any more - will be removed + * @param Zend_Ldap $ldap A Zend_Ldap object + * @return int The current error code for the resource + */ + public static function getLdapCode(Zend_Ldap $ldap = null) + { + if ($ldap !== null) { + return $ldap->getLastErrorCode(); + } + return 0; + } + + /** + * @deprecated will be removed + * @return int The current error code for this exception + */ + public function getErrorCode() + { + return $this->getCode(); + } +}