20#include <xrpld/conditions/detail/error.h>
21#include <xrpl/basics/safe_cast.h>
26namespace cryptoconditions {
35 name() const noexcept
override
37 return "cryptoconditions";
43 switch (safe_cast<error>(ev))
46 return "Specification: Requested type not supported.";
49 return "Specification: Requested subtype not supported.";
52 return "Specification: Requested type not recognized.";
55 return "Specification: Requested subtypes not recognized.";
58 return "Specification: Incorrect fingerprint size.";
61 return "Specification: Incorrect encoding.";
64 return "Bad buffer: contains trailing garbage.";
67 return "Bad buffer: no data.";
70 return "Bad buffer: overfull.";
73 return "Bad buffer: underfull.";
76 return "Malformed DER encoding.";
79 return "Malformed DER encoding: Unexpected tag.";
82 return "Malformed DER encoding: Short preamble.";
85 return "Implementation limit: Overlong tag.";
88 return "Implementation limit: Large payload.";
91 return "Implementation limit: Specified preimage is too long.";
95 return "generic error";
107 const noexcept override
109 return &condition.category() ==
this && condition.value() == ev;
115 return &
error.category() ==
this &&
error.value() == ev;
132 safe_cast<std::underlying_type<error>::type>(ev),
cryptoconditions_error_category()=default
bool equivalent(int ev, std::error_condition const &condition) const noexcept override
std::string message(int ev) const override
const char * name() const noexcept 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.