Hazelcast C++ Client
Hazelcast C++ Client Library
Loading...
Searching...
No Matches
hazelcast::client::exception::iexception Class Reference

Base class for all exception originated from Hazelcast methods. More...

#include <iexception.h>

Inheritance diagram for hazelcast::client::exception::iexception:

Public Member Functions

 iexception (std::string exception_name, std::string source, std::string message, std::string details, int32_t error_no, std::exception_ptr cause, bool is_runtime, bool retryable)
char const * what () const noexcept override
 return pointer to the explanation string.
const std::string & get_source () const
const std::string & get_message () const
const std::string & get_details () const
int32_t get_error_code () const
bool is_runtime () const
bool is_retryable () const

Protected Attributes

std::string src_
std::string msg_
std::string details_
int32_t error_code_
std::exception_ptr cause_
bool runtime_exception_
bool retryable_
std::string report_

Friends

std::ostream HAZELCAST_API & operator<< (std::ostream &os, const iexception &exception)

Detailed Description

Base class for all exception originated from Hazelcast methods.

See also
InstanceNotActiveException
interrupted_exception
io_exception
hazelcast_serialization_exception
Iclass_cast_exception
illegal_state_exception
illegal_argument_exception

Definition at line 48 of file iexception.h.

Constructor & Destructor Documentation

◆ iexception()

hazelcast::client::exception::iexception::iexception ( std::string exception_name,
std::string source,
std::string message,
std::string details,
int32_t error_no,
std::exception_ptr cause,
bool is_runtime,
bool retryable )

Definition at line 1208 of file client_impl.cpp.

1216 : src_(std::move(source))
1217 , msg_(std::move(message))
1218 , details_(std::move(details))
1219 , error_code_(error_no)
1220 , cause_(std::move(cause))
1221 , runtime_exception_(is_runtime)
1222 , retryable_(retryable)
1223 , report_((boost::format("%1% {%2%. Error code:%3%, Details:%4%.} at %5%.") %
1224 exception_name % msg_ % error_code_ % details_ % src_)
1225 .str())
1226{}

Member Function Documentation

◆ get_details()

const std::string & hazelcast::client::exception::iexception::get_details ( ) const

Definition at line 1256 of file client_impl.cpp.

1257{
1258 return details_;
1259}

◆ get_error_code()

int32_t hazelcast::client::exception::iexception::get_error_code ( ) const

Definition at line 1262 of file client_impl.cpp.

1263{
1264 return error_code_;
1265}

◆ get_message()

const std::string & hazelcast::client::exception::iexception::get_message ( ) const

Definition at line 1243 of file client_impl.cpp.

1244{
1245 return msg_;
1246}

◆ get_source()

const std::string & hazelcast::client::exception::iexception::get_source ( ) const

Definition at line 1237 of file client_impl.cpp.

1238{
1239 return src_;
1240}

◆ is_retryable()

bool hazelcast::client::exception::iexception::is_retryable ( ) const

Definition at line 1274 of file client_impl.cpp.

1275{
1276 return retryable_;
1277}

◆ is_runtime()

bool hazelcast::client::exception::iexception::is_runtime ( ) const

Definition at line 1268 of file client_impl.cpp.

1269{
1270 return runtime_exception_;
1271}

◆ what()

char const * hazelcast::client::exception::iexception::what ( ) const
overridenoexcept

return pointer to the explanation string.

Definition at line 1231 of file client_impl.cpp.

1232{
1233 return report_.c_str();
1234}

◆ operator<<

std::ostream HAZELCAST_API & operator<< ( std::ostream & os,
const iexception & exception )
friend

Definition at line 1248 of file client_impl.cpp.

1250{
1251 os << exception.what();
1252 return os;
1253}

Member Data Documentation

◆ cause_

std::exception_ptr hazelcast::client::exception::iexception::cause_
protected

Definition at line 92 of file iexception.h.

◆ details_

std::string hazelcast::client::exception::iexception::details_
protected

Definition at line 90 of file iexception.h.

◆ error_code_

int32_t hazelcast::client::exception::iexception::error_code_
protected

Definition at line 91 of file iexception.h.

◆ msg_

std::string hazelcast::client::exception::iexception::msg_
protected

Definition at line 89 of file iexception.h.

◆ report_

std::string hazelcast::client::exception::iexception::report_
protected

Definition at line 95 of file iexception.h.

◆ retryable_

bool hazelcast::client::exception::iexception::retryable_
protected

Definition at line 94 of file iexception.h.

◆ runtime_exception_

bool hazelcast::client::exception::iexception::runtime_exception_
protected

Definition at line 93 of file iexception.h.

◆ src_

std::string hazelcast::client::exception::iexception::src_
protected

Definition at line 88 of file iexception.h.


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