1#include <xrpl/conditions/detail/error.h>
3#include <xrpl/basics/safe_cast.h>
17 [[nodiscard]]
char const*
18 name() const noexcept
override
20 return "cryptoconditions";
29 return "Specification: Requested type not supported.";
32 return "Specification: Requested subtype not supported.";
35 return "Specification: Requested type not recognized.";
38 return "Specification: Requested subtypes not recognized.";
41 return "Specification: Incorrect fingerprint size.";
44 return "Specification: Incorrect encoding.";
47 return "Bad buffer: contains trailing garbage.";
50 return "Bad buffer: no data.";
53 return "Bad buffer: overfull.";
56 return "Bad buffer: underfull.";
59 return "Malformed DER encoding.";
62 return "Malformed DER encoding: Unexpected tag.";
65 return "Malformed DER encoding: Short preamble.";
68 return "Implementation limit: Overlong tag.";
71 return "Implementation limit: Large payload.";
74 return "Implementation limit: Specified preimage is too long.";
78 return "generic error";
91 return &condition.category() ==
this && condition.value() == ev;
97 return &error.category() ==
this && error.value() == ev;
std::string message(int ev) const override
std::error_condition default_error_condition(int ev) const noexcept override
bool equivalent(int ev, std::error_condition const &condition) const noexcept override
char const * name() const noexcept override
bool equivalent(std::error_code const &error, int ev) const noexcept override
CryptoconditionsErrorCategory()=default
std::error_category const & getCryptoconditionsErrorCategory()
std::error_code make_error_code(Error ev)
constexpr std::enable_if_t< std::is_integral_v< Dest > &&std::is_integral_v< Src >, Dest > safeCast(Src s) noexcept