]> git.sur5r.net Git - openldap/blobdiff - contrib/ldapc++/src/LDAPException.cpp
Entry rwlock is no longer needed as concurrency is managed
[openldap] / contrib / ldapc++ / src / LDAPException.cpp
index b4303a337c0f30f320508c3f343b8dcbb7d2919c..5038df613b794eba9b005dc54c49949e0b0496dd 100644 (file)
@@ -12,6 +12,8 @@
 
 #include "LDAPAsynConnection.h"
 
+using namespace std;
+
 LDAPException::LDAPException(int res_code, const string& err_string){
        m_res_code=res_code;
        m_res_string=string(ldap_err2string(res_code));
@@ -40,9 +42,13 @@ const string& LDAPException::getResultMsg() const{
        return m_res_string;
 }
 
+const string& LDAPException::getServerMsg() const{
+    return m_err_string;
+}
+
 ostream& operator << (ostream& s, LDAPException e){
        s << "Error " << e.m_res_code << ": " << e.m_res_string;
-       if (e.m_err_string.size() > 0) {
+       if (!e.m_err_string.empty()) {
                s << endl <<  "additional info: " << e.m_err_string ;
        }
        return s;