9 #ifndef BOTAN_ASIO_ERROR_H_
10 #define BOTAN_ASIO_ERROR_H_
12 #include <botan/build.h>
14 #include <boost/version.hpp>
15 #if BOOST_VERSION >= 106600
17 #include <boost/system/system_error.hpp>
19 #include <botan/exceptn.h>
20 #include <botan/tls_alert.h>
21 #include <botan/tls_exceptn.h>
42 const char*
name() const noexcept
override
44 return "Botan TLS Stream";
47 std::string
message(
int value)
const override
52 return "stream truncated";
54 return "generic error";
73 const char*
name() const noexcept
override
75 return "Botan TLS Alert";
78 std::string
message(
int ev)
const override
101 const char*
name() const noexcept
override
132 template<>
struct is_error_code_enum<
Botan::TLS::Alert::Type>
134 static const bool value =
true;
139 static const bool value =
true;
144 static const bool value =
true;
150 #endif // BOOST_VERSION
151 #endif // BOTAN_ASIO_ERROR_H_
const char * name() const noexceptoverride
const BotanErrorCategory & botan_category() noexcept
An error category for TLS alerts.
boost::system::error_code make_error_code(Botan::ErrorType e)
const BotanAlertCategory & botan_alert_category() noexcept
const char * name() const noexceptoverride
std::string message(int ev) const override
std::string to_string(ErrorType type)
Convert an ErrorType to string.
std::string message(int value) const override
const StreamCategory & botan_stream_category()
boost::system::error_code make_error_code(Botan::TLS::StreamError e)
std::string message(int ev) const override
An error category for errors from the TLS::Stream.
const char * name() const noexceptoverride
An error category for errors from Botan (other than TLS alerts)
std::string type_string() const