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
132template<>
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;
std::string type_string() const
const StreamCategory & botan_stream_category()
const BotanAlertCategory & botan_alert_category() noexcept
boost::system::error_code make_error_code(Botan::TLS::StreamError e)
const BotanErrorCategory & botan_category() noexcept
std::string to_string(ErrorType type)
Convert an ErrorType to string.
boost::system::error_code make_error_code(Botan::ErrorType e)
An error category for errors from Botan (other than TLS alerts)
std::string message(int ev) const override
const char * name() const noexcept override
An error category for TLS alerts.
std::string message(int ev) const override
const char * name() const noexcept override
An error category for errors from the TLS::Stream.
const char * name() const noexcept override
std::string message(int value) const override