]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // |
2 | // Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com) | |
3 | // | |
4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | |
5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
6 | // | |
7 | ||
8 | #ifndef BEAST_ERROR_HPP | |
9 | #define BEAST_ERROR_HPP | |
10 | ||
11 | #include <beast/config.hpp> | |
12 | #include <boost/system/error_code.hpp> | |
13 | #include <boost/system/system_error.hpp> | |
14 | ||
15 | namespace beast { | |
16 | ||
17 | /// The type of error code used by the library | |
18 | using error_code = boost::system::error_code; | |
19 | ||
20 | /// The type of system error thrown by the library | |
21 | using system_error = boost::system::system_error; | |
22 | ||
23 | /// The type of error category used by the library | |
24 | using error_category = boost::system::error_category; | |
25 | ||
26 | /// A function to return the system error category used by the library | |
27 | #if BEAST_DOXYGEN | |
28 | error_category const& | |
29 | system_category(); | |
30 | #else | |
31 | using boost::system::system_category; | |
32 | #endif | |
33 | ||
34 | /// The type of error condition used by the library | |
35 | using error_condition = boost::system::error_condition; | |
36 | ||
37 | /// The set of constants used for cross-platform error codes | |
38 | #if BEAST_DOXYGEN | |
39 | enum errc{}; | |
40 | #else | |
41 | namespace errc = boost::system::errc; | |
42 | #endif | |
43 | } // beast | |
44 | ||
45 | #endif |