ldapsdk
0.0.1
Main Page
Classes
Files
File List
File Members
src
LDAPException.h
Go to the documentation of this file.
1
// $OpenLDAP$
2
/*
3
* Copyright 2000-2011 The OpenLDAP Foundation, All Rights Reserved.
4
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5
*/
6
7
8
#ifndef LDAP_EXCEPTION_H
9
#define LDAP_EXCEPTION_H
10
11
#include <iostream>
12
#include <string>
13
#include <stdexcept>
14
15
#include <
LDAPUrlList.h
>
16
17
class
LDAPAsynConnection
;
18
23
class
LDAPException
:
public
std::runtime_error
24
{
25
26
public
:
33
LDAPException
(
int
res_code,
34
const
std::string& err_string=std::string())
throw
();
35
42
LDAPException
(
const
LDAPAsynConnection
*lc)
throw
();
43
47
virtual
~LDAPException
()
throw
();
48
52
int
getResultCode
()
const
throw
();
53
58
const
std::string&
getResultMsg
()
const
throw
();
59
63
const
std::string&
getServerMsg
()
const
throw
();
64
65
66
virtual
const
char
*
what
()
const
throw
();
67
72
friend
std::ostream&
operator <<
(std::ostream &s,
LDAPException
e)
throw
();
73
74
private
:
75
int
m_res_code;
76
std::string m_res_string;
77
std::string m_err_string;
78
};
79
84
class
LDAPReferralException
:
public
LDAPException
85
{
86
87
public
:
91
LDAPReferralException
(
const
LDAPUrlList
& urls)
throw
();
92
96
~LDAPReferralException
()
throw
();
97
101
const
LDAPUrlList
&
getUrls
()
throw
();
102
103
private
:
104
LDAPUrlList
m_urlList;
105
};
106
107
#endif //LDAP_EXCEPTION_H
Generated by
1.8.1