56 requires std::is_convertible_v<T, std::string>
58 return lhs + rhs.message();
63 operator==(T
const& lhs, CassandraError
const& rhs)
64 requires std::is_convertible_v<T, std::string>
66 return lhs == rhs.message();
69 template <std::
integral T>
71 operator==(T
const& lhs, CassandraError
const& rhs)
73 return lhs == rhs.code();
77 operator<<(std::ostream& os, CassandraError
const& err)
108 return code_ == CASS_ERROR_LIB_NO_HOSTS_AVAILABLE or code_ == CASS_ERROR_LIB_REQUEST_TIMED_OUT or
109 code_ == CASS_ERROR_SERVER_UNAVAILABLE or code_ == CASS_ERROR_SERVER_OVERLOADED or
110 code_ == CASS_ERROR_SERVER_READ_TIMEOUT;
119 return code_ == CASS_ERROR_SERVER_INVALID_QUERY;
A simple container for both error message and error code.
Definition Error.hpp:34
CassandraError(std::string message, uint32_t code)
Construct a new CassandraError object.
Definition Error.hpp:48
bool isTimeout() const
Definition Error.hpp:106
bool isInvalidQuery() const
Definition Error.hpp:117
uint32_t code() const
Definition Error.hpp:97
std::string message() const
Definition Error.hpp:88
This namespace implements a wrapper for the Cassandra C++ driver.
Definition Concepts.hpp:37
std::ostream & operator<<(std::ostream &stream, Severity sev)
Custom labels for Severity in log output.
Definition Logger.cpp:73