Files
boost_beast/include/boost/beast/websocket/detail/error.hpp
T

79 lines
1.4 KiB
C++
Raw Normal View History

2018-01-01 12:16:19 -08:00
//
// Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOOST_BEAST_WEBSOCKET_DETAIL_ERROR_IPP
#define BOOST_BEAST_WEBSOCKET_DETAIL_ERROR_IPP
#include <boost/beast/core/error.hpp>
#include <boost/beast/core/string.hpp>
namespace boost {
namespace beast {
namespace websocket {
enum class error;
2018-01-01 13:13:43 -08:00
enum class condition;
2018-01-01 12:16:19 -08:00
} // websocket
} // beast
namespace system {
template<>
struct is_error_code_enum<beast::websocket::error>
{
static bool const value = true;
};
2018-01-01 13:13:43 -08:00
template<>
struct is_error_condition_enum<beast::websocket::condition>
{
static bool const value = true;
};
2018-01-01 12:16:19 -08:00
} // system
namespace beast {
namespace websocket {
namespace detail {
class error_codes : public error_category
{
public:
const char*
2018-01-01 17:49:19 -08:00
name() const noexcept override;
2018-01-01 12:16:19 -08:00
std::string
2018-01-01 17:49:19 -08:00
message(int ev) const override;
error_condition
default_error_condition(int ev) const noexcept override;
2018-01-01 13:13:43 -08:00
};
class error_conditions : public error_category
{
public:
const char*
2018-01-01 17:49:19 -08:00
name() const noexcept override;
2018-01-01 13:13:43 -08:00
std::string
2018-01-01 17:49:19 -08:00
message(int cv) const override;
2018-01-01 12:16:19 -08:00
};
} // detail
error_code
2018-01-01 17:49:19 -08:00
make_error_code(error e);
2018-01-01 12:16:19 -08:00
2018-01-01 13:13:43 -08:00
error_condition
2018-01-01 17:49:19 -08:00
make_error_condition(condition c);
2018-01-01 13:13:43 -08:00
2018-01-01 12:16:19 -08:00
} // websocket
} // beast
} // boost
#endif