diff -r 000000000000 -r 4eba9c11703f web/Zend/Ldap/Exception.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Ldap/Exception.php Mon Dec 13 18:29:26 2010 +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(); + } +}