X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Fldap%2FResultCode.cpp;fp=source%2Fldap%2FResultCode.cpp;h=c1311e42809dcfa1bef8e68c0bcdd0440cd1af4b;hp=9c254862229170a56f15241a03c8bd37c78cfce8;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/source/ldap/ResultCode.cpp b/source/ldap/ResultCode.cpp index 9c25486..c1311e4 100644 --- a/source/ldap/ResultCode.cpp +++ b/source/ldap/ResultCode.cpp @@ -18,7 +18,7 @@ using namespace std; #define DoErrorCode(methodName,macroName) \ bool anna::ldap::ResultCode::methodName () const \ - throw () \ + \ { \ return a_value == (macroName); \ } @@ -41,7 +41,7 @@ DoErrorCode(isConnectError, LDAP_CONNECT_ERROR) #define DoErrorRange(methodName,rangeName) \ bool anna::ldap::ResultCode::methodName () const \ - throw () \ + \ { \ return rangeName (a_value) != 0; \ } @@ -68,7 +68,7 @@ anna::ldap::ResultCode::ResultCode(const int ldap_method_result) : * que el método invicado devuelva 0, pero indique el código de error el extraError. */ anna::ldap::ResultCode& anna::ldap::ResultCode::operator= (const int ldap_method_result) -throw() { +{ if((a_value = ldap_method_result) != LDAP_SUCCESS) { const char* text = ldap_err2string(ldap_method_result); a_text = (text == NULL) ? "" : text; @@ -78,7 +78,7 @@ throw() { } void anna::ldap::ResultCode::setValue(const int ldap_method_result, const int ldap_method_error) -throw() { +{ if(ldap_method_result != LDAP_SUCCESS) operator= (ldap_method_result); else @@ -86,7 +86,7 @@ throw() { } const string anna::ldap::ResultCode::asString() const -throw() { +{ string result(functions::asText("ldap::ResultCode { Value: ", a_value)); if(a_text.empty() == false) { @@ -98,7 +98,7 @@ throw() { } bool anna::ldap::ResultCode::extractResultCode(const Session* session) -throw() { +{ LDAP* handle = (LDAP*)((Session*) session)->getLDAP(); int result = -1;