00001 #ifndef _LDIF2ClassAdExceptions_h_
00002 #define _LDIF2ClassAdExceptions_h_
00003
00004
00005
00006
00007
00008
00009 #include "edg/workload/common/utilities/Exceptions.h"
00010 #include "edg/workload/common/ldif2classad/exception_codes.h"
00011
00012 namespace utilities = edg::workload::common::utilities;
00013
00014 namespace edg {
00015 namespace workload {
00016 namespace common {
00017 namespace ldif2classad {
00018
00019 class Exception : public utilities::Exception
00020 {
00021 protected:
00022 Exception() {}
00023 Exception(const std::string& s, const std::string& m, int c, const std::string& n) :
00024 utilities::Exception(s, m, c, n) {}
00025 };
00026
00027 struct ConnectionException : ldif2classad::Exception
00028 {
00029 ConnectionException(const std::string& source, const std::string& method, const std::string& message) :
00030 ldif2classad::Exception( source, method, LDAP_CONNECTION_ERROR, "ConnectionException" ) {
00031 this -> error_message = message;
00032 }
00033 };
00034
00035 struct QueryException : ldif2classad::Exception
00036 {
00037 QueryException(const std::string& source, const std::string& method, const std::string& message) :
00038 ldif2classad::Exception( source, method, LDAP_QUERY_ERROR, "QueryException" ) {
00039 this -> error_message = message;
00040 }
00041
00042 };
00043
00044 struct UndefinedValueException : ldif2classad::Exception
00045 {
00046 UndefinedValueException(const std::string& source, const std::string& method, const std::string& message) :
00047 ldif2classad::Exception( source, method, LDAP_UNDEFINED_VALUE_ERROR, "UndefinedValueException" ) {
00048 this -> error_message = message;
00049 }
00050
00051 };
00052
00053
00054
00055 }
00056 }
00057 }
00058 }
00059
00060 #endif