Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:43:58

0001 //
0002 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/beast
0008 //
0009 
0010 #ifndef BOOST_BEAST_ERROR_HPP
0011 #define BOOST_BEAST_ERROR_HPP
0012 
0013 #include <boost/beast/core/detail/config.hpp>
0014 #include <boost/system/error_code.hpp>
0015 #include <boost/system/system_error.hpp>
0016 
0017 namespace boost {
0018 namespace beast {
0019 
0020 /// The type of error code used by the library
0021 using error_code = boost::system::error_code;
0022 
0023 /// The type of system error thrown by the library
0024 using system_error = boost::system::system_error;
0025 
0026 /// The type of error category used by the library
0027 using error_category = boost::system::error_category;
0028 
0029 /// A function to return the generic error category used by the library
0030 #if BOOST_BEAST_DOXYGEN
0031 error_category const&
0032 generic_category();
0033 #else
0034 using boost::system::generic_category;
0035 #endif
0036 
0037 /// A function to return the system error category used by the library
0038 #if BOOST_BEAST_DOXYGEN
0039 error_category const&
0040 system_category();
0041 #else
0042 using boost::system::system_category;
0043 #endif
0044 
0045 /// The type of error condition used by the library
0046 using error_condition = boost::system::error_condition;
0047 
0048 /// The set of constants used for cross-platform error codes
0049 #if BOOST_BEAST_DOXYGEN
0050 enum errc{};
0051 #else
0052 namespace errc = boost::system::errc;
0053 #endif
0054 
0055 //------------------------------------------------------------------------------
0056 
0057 /// Error codes returned from library operations
0058 enum class error
0059 {
0060     /** The socket was closed due to a timeout
0061 
0062         This error indicates that a socket was closed due to a
0063         a timeout detected during an operation.
0064 
0065         Error codes with this value will compare equal to @ref condition::timeout.
0066     */
0067     timeout = 1
0068 };
0069 
0070 /// Error conditions corresponding to sets of library error codes.
0071 enum class condition
0072 {
0073     /** The operation timed out
0074 
0075         This error indicates that an operation took took too long.
0076     */
0077     timeout = 1
0078 };
0079 
0080 } // beast
0081 } // boost
0082 
0083 #include <boost/beast/core/impl/error.hpp>
0084 #ifdef BOOST_BEAST_HEADER_ONLY
0085 #include <boost/beast/core/impl/error.ipp>
0086 #endif
0087 
0088 #endif