11 #if !defined(RESTINIO_USE_BOOST_ASIO) 24 return ec == asio_ns::error::operation_aborted;
29 return ec == asio_ns::error::eof;
44 #define RESTINIO_ERROR_CATEGORY_NAME_NOEXCEPT ASIO_ERROR_CATEGORY_NOEXCEPT 48 #if defined(ASIO_HAS_WINDOWS_OVERLAPPED_PTR) 50 #define RESTINIO_ASIO_HAS_WINDOWS_OVERLAPPED_PTR 56 #include <boost/asio.hpp> 63 using namespace ::boost::asio;
64 using error_code = ::boost::system::error_code;
69 inline bool error_is_operation_aborted(
const asio_ns::error_code & ec )
71 return ec == asio_ns::error::basic_errors::operation_aborted;
74 inline bool error_is_eof(
const asio_ns::error_code & ec )
76 return ec == asio_ns::error::misc_errors::eof;
82 constexpr auto eof = asio_ns::error::misc_errors::eof;
84 inline const auto & system_category() {
return ::boost::system::system_category(); }
89 using error_category_base_t = ::boost::system::error_category;
92 #define RESTINIO_ERROR_CATEGORY_NAME_NOEXCEPT BOOST_SYSTEM_NOEXCEPT 96 #if defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR) 98 #define RESTINIO_ASIO_HAS_WINDOWS_OVERLAPPED_PTR 152 "write group destroyed without external notificato invokation" );
180 return asio_ns::error_code{
static_cast<
int >( err ), restinio_err_category() };
After write notificator error: a notificator was set for a write_group_t but no external invokation h...
After write notificator error: data was not sent, connection closed (or aborted) before a given piece...
asio_convertible_error_t
Enum for restinio errors that must presented as asio_ns::error_code value.
virtual std::string message(int value) const override
const auto & system_category()
virtual const char * name() const RESTINIO_ERROR_CATEGORY_NAME_NOEXCEPT override
#define RESTINIO_ERROR_CATEGORY_NAME_NOEXCEPT
bool error_is_operation_aborted(const asio_ns::error_code &ec)
asio_ns::error_code make_asio_compaible_error(asio_convertible_error_t err) noexcept
Make restinio error_code compatible with asio_ns::error_code.
const error_category_base_t & restinio_err_category()
Get restinio error category.
bool error_is_eof(const asio_ns::error_code &ec)
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...