summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/include/asio/detail/impl/throw_error.ipp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio/include/asio/detail/impl/throw_error.ipp')
-rw-r--r--3rdparty/asio/include/asio/detail/impl/throw_error.ipp49
1 files changed, 49 insertions, 0 deletions
diff --git a/3rdparty/asio/include/asio/detail/impl/throw_error.ipp b/3rdparty/asio/include/asio/detail/impl/throw_error.ipp
new file mode 100644
index 00000000000..7baf3e729e5
--- /dev/null
+++ b/3rdparty/asio/include/asio/detail/impl/throw_error.ipp
@@ -0,0 +1,49 @@
+//
+// detail/impl/throw_error.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2024 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 ASIO_DETAIL_IMPL_THROW_ERROR_IPP
+#define ASIO_DETAIL_IMPL_THROW_ERROR_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/system_error.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace detail {
+
+void do_throw_error(
+ const asio::error_code& err
+ ASIO_SOURCE_LOCATION_PARAM)
+{
+ asio::system_error e(err);
+ asio::detail::throw_exception(e ASIO_SOURCE_LOCATION_ARG);
+}
+
+void do_throw_error(
+ const asio::error_code& err,
+ const char* location
+ ASIO_SOURCE_LOCATION_PARAM)
+{
+ asio::system_error e(err, location);
+ asio::detail::throw_exception(e ASIO_SOURCE_LOCATION_ARG);
+}
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_DETAIL_IMPL_THROW_ERROR_IPP