ldapsdk  0.0.1
Public Member Functions | Friends | List of all members
LDAPException Class Reference

This class is only thrown as an Exception and used to signalize error conditions during LDAP-operations. More...

#include <LDAPException.h>

Inheritance diagram for LDAPException:
LDAPReferralException

Public Member Functions

 LDAPException (int res_code, const std::string &err_string=std::string()) throw ()
 Constructs a LDAPException-object from the parameters. More...
 
 LDAPException (const LDAPAsynConnection *lc) throw ()
 Constructs a LDAPException-object from the error state of a LDAPAsynConnection-object. More...
 
virtual ~LDAPException () throw ()
 Destructor. More...
 
int getResultCode () const throw ()
 
const std::string & getResultMsg () const throw ()
 
const std::string & getServerMsg () const throw ()
 
virtual const char * what () const throw ()
 

Friends

std::ostream & operator<< (std::ostream &s, LDAPException e) throw ()
 This method can be used to dump the data of a LDAPResult-Object. More...
 

Detailed Description

This class is only thrown as an Exception and used to signalize error conditions during LDAP-operations.

Constructor & Destructor Documentation

◆ LDAPException() [1/2]

LDAPException::LDAPException ( int  res_code,
const std::string &  err_string = std::string() 
)
throw (
)

Constructs a LDAPException-object from the parameters.

Parameters
res_codeA valid LDAP result code.
err_stringAn addional error message for the error that happend (optional)

◆ LDAPException() [2/2]

LDAPException::LDAPException ( const LDAPAsynConnection lc)
throw (
)

Constructs a LDAPException-object from the error state of a LDAPAsynConnection-object.

Parameters
lcA LDAP-Connection for that an error has happend. The Constructor tries to read its error state.

◆ ~LDAPException()

LDAPException::~LDAPException ( )
throw (
)
virtual

Destructor.

Member Function Documentation

◆ getResultCode()

int LDAPException::getResultCode ( ) const
throw (
)
Returns
The Result code of the object

◆ getResultMsg()

const string & LDAPException::getResultMsg ( ) const
throw (
)
Returns
The error message that is corresponding to the result code .

◆ getServerMsg()

const string & LDAPException::getServerMsg ( ) const
throw (
)
Returns
The addional error message of the error (if it was set)

◆ what()

const char * LDAPException::what ( ) const
throw (
)
virtual

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  s,
LDAPException  e 
)
throw (
)
friend

This method can be used to dump the data of a LDAPResult-Object.

It is only useful for debugging purposes at the moment


The documentation for this class was generated from the following files: