Files
externals/linux/include/ActivBoost/asio/detail/impl/throw_error.ipp
T
2023-12-15 13:15:08 -05:00

52 lines
1.4 KiB
C++

//
// detail/impl/throw_error.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff 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)
//
#ifndef ACTIV_BOOST_ASIO_DETAIL_IMPL_THROW_ERROR_IPP
#define ACTIV_BOOST_ASIO_DETAIL_IMPL_THROW_ERROR_IPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <ActivBoost/asio/detail/config.hpp>
#include <ActivBoost/asio/detail/throw_error.hpp>
#include <ActivBoost/system/system_error.hpp>
#include <ActivBoost/asio/detail/push_options.hpp>
namespace Boost {
namespace asio {
namespace detail {
void do_throw_error(
const Boost::system::error_code& err
ACTIV_BOOST_ASIO_SOURCE_LOCATION_PARAM)
{
Boost::system::system_error e(err);
Boost::asio::detail::throw_exception(e ACTIV_BOOST_ASIO_SOURCE_LOCATION_ARG);
}
void do_throw_error(
const Boost::system::error_code& err,
const char* location
ACTIV_BOOST_ASIO_SOURCE_LOCATION_PARAM)
{
Boost::system::system_error e(err, location);
Boost::asio::detail::throw_exception(e ACTIV_BOOST_ASIO_SOURCE_LOCATION_ARG);
}
} // namespace detail
} // namespace asio
} // namespace Boost
#include <ActivBoost/asio/detail/pop_options.hpp>
#endif // ACTIV_BOOST_ASIO_DETAIL_IMPL_THROW_ERROR_IPP