20#include <xrpld/conditions/detail/error.h>
22#include <xrpl/basics/safe_cast.h>
27namespace cryptoconditions {
36 name() const noexcept
override
38 return "cryptoconditions";
44 switch (safe_cast<error>(ev))
47 return "Specification: Requested type not supported.";
50 return "Specification: Requested subtype not supported.";
53 return "Specification: Requested type not recognized.";
56 return "Specification: Requested subtypes not recognized.";
59 return "Specification: Incorrect fingerprint size.";
62 return "Specification: Incorrect encoding.";
65 return "Bad buffer: contains trailing garbage.";
68 return "Bad buffer: no data.";
71 return "Bad buffer: overfull.";
74 return "Bad buffer: underfull.";
77 return "Malformed DER encoding.";
80 return "Malformed DER encoding: Unexpected tag.";
83 return "Malformed DER encoding: Short preamble.";
86 return "Implementation limit: Overlong tag.";
89 return "Implementation limit: Large payload.";
92 return "Implementation limit: Specified preimage is too long.";
96 return "generic error";
108 const noexcept override
116 return &
error.category() ==
this &&
error.value() == ev;
133 safe_cast<std::underlying_type<error>::type>(ev),
cryptoconditions_error_category()=default
char const * name() const noexcept override
bool equivalent(int ev, std::error_condition const &condition) const noexcept override
std::string message(int ev) const override
bool equivalent(std::error_code const &error, int ev) const noexcept override
std::error_condition default_error_condition(int ev) const noexcept override
std::error_category const & get_cryptoconditions_error_category()
std::error_code make_error_code(error ev)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.