22 #include <boost/format.hpp>
23 #include <boost/exception_ptr.hpp>
25 #include "hazelcast/util/export.h"
27 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
29 #pragma warning(disable: 4251)
30 #pragma warning(disable: 4275)
53 iexception(
const std::string &exception_name,
const std::string &source,
const std::string &message,
54 const std::string &details, int32_t error_no, std::exception_ptr cause,
bool is_runtime,
63 char const *what()
const noexcept
override;
65 const std::string &get_source()
const;
67 const std::string &get_message()
const;
69 const std::string &get_details()
const;
71 int32_t get_error_code()
const;
73 bool is_runtime()
const;
75 bool is_retryable()
const;
77 friend std::ostream HAZELCAST_API &operator<<(std::ostream &os,
const iexception &exception);
84 std::exception_ptr cause_;
85 bool runtime_exception_;
90 std::ostream HAZELCAST_API &operator<<(std::ostream &os,
const iexception &exception);
92 template<
typename EXCEPTIONCLASS>
107 boost::exception_detail::clone_impl<EXCEPTIONCLASS>
build() {
108 return boost::enable_current_exception(EXCEPTIONCLASS(source_, msg_.str()));
112 std::ostringstream msg_;
119 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
boost::exception_detail::clone_impl< EXCEPTIONCLASS > build()
Base class for all exception originated from Hazelcast methods.