19 #ifndef HAZELCAST_EXCEPTION 20 #define HAZELCAST_EXCEPTION 28 #include <boost/shared_ptr.hpp> 30 #include "hazelcast/util/HazelcastDll.h" 32 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 34 #pragma warning(disable: 4251) //for dll export 35 #pragma warning(disable: 4275) //for dll export 55 IException(
const std::string &exceptionName,
const std::string &source,
const std::string &message,
56 const std::string &details, int32_t errorNo, int32_t causeCode,
bool isRuntime,
bool retryable =
false);
58 IException(
const std::string &exceptionName,
const std::string &source,
const std::string &message,
59 int32_t errorNo, int32_t causeCode,
bool isRuntime,
bool retryable =
false);
61 IException(
const std::string &exceptionName,
const std::string &source,
const std::string &message,
62 int32_t errorNo,
bool isRuntime,
bool retryable =
false);
64 IException(
const std::string &exceptionName,
const std::string &source,
const std::string &message,
65 int32_t errorNo,
const boost::shared_ptr<IException> &cause,
bool isRuntime,
bool retryable =
false);
73 virtual char const *what()
const throw();
75 const std::string &getSource()
const;
77 const std::string &getMessage()
const;
79 virtual void raise()
const;
87 virtual std::auto_ptr<IException> clone()
const;
89 const std::string &getDetails()
const;
91 int32_t getErrorCode()
const;
93 int32_t getCauseErrorCode()
const;
95 const boost::shared_ptr<IException> &getCause()
const;
97 bool isRuntimeException()
const;
99 bool isRetryable()
const;
101 friend std::ostream HAZELCAST_API &operator<<(std::ostream &os,
const IException &exception);
109 int32_t causeErrorCode;
110 boost::shared_ptr<IException> cause;
111 bool runtimeException;
115 std::ostream HAZELCAST_API &operator<<(std::ostream &os,
const IException &exception);
117 template<
typename EXCEPTIONCLASS>
133 return EXCEPTIONCLASS(source, msg.str());
136 boost::shared_ptr<EXCEPTIONCLASS> buildShared() {
137 return boost::shared_ptr<EXCEPTIONCLASS>(
new EXCEPTIONCLASS(source, msg.str()));
142 std::ostringstream msg;
149 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 153 #endif //HAZELCAST_EXCEPTION Base class for all exception originated from Hazelcast methods.
Definition: IException.h:53
Definition: IException.h:118
EXCEPTIONCLASS build()
Definition: IException.h:132
PN (Positive-Negative) CRDT counter.
Definition: MapEntryView.h:32