• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// detail/impl/throw_error.ipp
3// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
4//
5// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6//
7// Distributed under the Boost Software License, Version 1.0. (See accompanying
8// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9//
10
11#ifndef ASIO_DETAIL_IMPL_THROW_ERROR_IPP
12#define ASIO_DETAIL_IMPL_THROW_ERROR_IPP
13
14
15#include "asio/detail/config.hpp"
16#include "asio/detail/throw_error.hpp"
17#include "asio/detail/throw_exception.hpp"
18#include "asio/system_error.hpp"
19
20#include "asio/detail/push_options.hpp"
21
22namespace asio {
23namespace detail {
24
25void do_throw_error(const asio::error_code& err)
26{
27  asio::system_error e(err);
28  asio::detail::throw_exception(e);
29}
30
31void do_throw_error(const asio::error_code& err, const char* location)
32{
33  // boostify: non-boost code starts here
34  // boostify: non-boost code ends here
35  asio::system_error e(err, location);
36  asio::detail::throw_exception(e);
37  // boostify: non-boost code starts here
38  // boostify: non-boost code ends here
39}
40
41} // namespace detail
42} // namespace asio
43
44#include "asio/detail/pop_options.hpp"
45
46#endif // ASIO_DETAIL_IMPL_THROW_ERROR_IPP
47