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);
58 IException(
const std::string &exceptionName,
const std::string &source,
const std::string &message,
59 int32_t errorNo, int32_t causeCode);
61 IException(
const std::string &exceptionName,
const std::string &source,
const std::string &message,
64 IException(
const std::string &exceptionName,
const std::string &source,
const std::string &message,
65 int32_t errorNo,
const boost::shared_ptr<IException> &cause);
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 friend std::ostream HAZELCAST_API &operator<<(std::ostream &os,
const IException &exception);
105 int32_t causeErrorCode;
106 boost::shared_ptr<IException> cause;
109 std::ostream HAZELCAST_API &operator<<(std::ostream &os,
const IException &exception);
111 template<
typename EXCEPTIONCLASS>
127 return EXCEPTIONCLASS(source, msg.str());
130 boost::shared_ptr<EXCEPTIONCLASS> buildShared() {
131 return boost::shared_ptr<EXCEPTIONCLASS>(
new EXCEPTIONCLASS(source, msg.str()));
136 std::ostringstream msg;
143 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) 147 #endif //HAZELCAST_EXCEPTION Base class for all exception originated from Hazelcast methods.
Definition: IException.h:53
Definition: IException.h:112
EXCEPTIONCLASS build()
Definition: IException.h:126
PN (Positive-Negative) CRDT counter.
Definition: MapEntryView.h:32