1#include <xrpld/conditions/detail/error.h>
3#include <xrpl/basics/safe_cast.h>
8namespace cryptoconditions {
17 name() const noexcept
override
19 return "cryptoconditions";
25 switch (safe_cast<error>(ev))
28 return "Specification: Requested type not supported.";
31 return "Specification: Requested subtype not supported.";
34 return "Specification: Requested type not recognized.";
37 return "Specification: Requested subtypes not recognized.";
40 return "Specification: Incorrect fingerprint size.";
43 return "Specification: Incorrect encoding.";
46 return "Bad buffer: contains trailing garbage.";
49 return "Bad buffer: no data.";
52 return "Bad buffer: overfull.";
55 return "Bad buffer: underfull.";
58 return "Malformed DER encoding.";
61 return "Malformed DER encoding: Unexpected tag.";
64 return "Malformed DER encoding: Short preamble.";
67 return "Implementation limit: Overlong tag.";
70 return "Implementation limit: Large payload.";
73 return "Implementation limit: Specified preimage is too long.";
77 return "generic error";
89 const noexcept override
91 return &condition.category() ==
this && condition.value() == ev;
97 return &
error.category() ==
this &&
error.value() == ev;
114 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.