10 #ifndef RAD_ERRORS_HPP
11 #define RAD_ERRORS_HPP
13 #include <system_error>
26 const char*
name() const noexcept override final {
return "RAD Error"; }
28 std::string
message(
int err_value)
const override final {
29 switch (static_cast<rad::ErrorCodes>(err_value)) {
31 return "Reply timed out.";
33 return "Operation was cancelled.";
35 return "Error parsing message payload.";
38 return "Unknown error";
62 struct is_error_code_enum<rad::
ErrorCodes> : std::true_type {};
66 #endif // RAD_ERRORS_HPP
Definition: errors.hpp:24
const ErrorCategory & GetErrorCategory()
Definition: errors.hpp:43
const char * name() const noexceptoverridefinal
Definition: errors.hpp:26
ErrorCodes
Definition: errors.hpp:17
std::string message(int err_value) const overridefinal
Definition: errors.hpp:28
std::error_code make_error_code(rad::ErrorCodes e)
Definition: errors.hpp:52