00001
00002
00003
00004
00005
00006
00007 #ifndef LDAP_EXCEPTION_H
00008 #define LDAP_EXCEPTION_H
00009
00010 #include <iostream>
00011 #include <string>
00012
00013 class LDAPAsynConnection;
00014
00019 class LDAPException{
00020
00021 public :
00028 LDAPException(int res_code, const std::string& err_string=std::string());
00029
00036 LDAPException(const LDAPAsynConnection *lc);
00037
00041 virtual ~LDAPException();
00042
00047 int getResultCode() const;
00048
00053 const std::string& getResultMsg() const;
00054
00058 const std::string& getServerMsg() const;
00059
00064 friend std::ostream& operator << (std::ostream &s, LDAPException e);
00065
00066 private :
00067 int m_res_code;
00068 std::string m_res_string;
00069 std::string m_err_string;
00070 };
00071 #endif //LDAP_EXCEPTION_H