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(); } }