]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/asio/multiple_exceptions.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / asio / multiple_exceptions.hpp
CommitLineData
20effc67
TL
1//
2// multiple_exceptions.hpp
3// ~~~~~~~~~~~~~~~~~~~~~~~
4//
5// Copyright (c) 2003-2020 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 BOOST_ASIO_MULTIPLE_EXCEPTIONS_HPP
12#define BOOST_ASIO_MULTIPLE_EXCEPTIONS_HPP
13
14#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15# pragma once
16#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18#include <boost/asio/detail/config.hpp>
19#include <exception>
20#include <boost/asio/detail/push_options.hpp>
21
22namespace boost {
23namespace asio {
24
25#if defined(BOOST_ASIO_HAS_STD_EXCEPTION_PTR) \
26 || defined(GENERATING_DOCUMENTATION)
27
28/// Exception thrown when there are multiple pending exceptions to rethrow.
29class multiple_exceptions
30 : public std::exception
31{
32public:
33 /// Constructor.
34 BOOST_ASIO_DECL multiple_exceptions(
35 std::exception_ptr first) BOOST_ASIO_NOEXCEPT;
36
37 /// Obtain message associated with exception.
38 BOOST_ASIO_DECL virtual const char* what() const
39 BOOST_ASIO_NOEXCEPT_OR_NOTHROW;
40
41 /// Obtain a pointer to the first exception.
42 BOOST_ASIO_DECL std::exception_ptr first_exception() const;
43
44private:
45 std::exception_ptr first_;
46};
47
48#endif // defined(BOOST_ASIO_HAS_STD_EXCEPTION_PTR)
49 // || defined(GENERATING_DOCUMENTATION)
50
51} // namespace asio
52} // namespace boost
53
54#include <boost/asio/detail/pop_options.hpp>
55
56#if defined(BOOST_ASIO_HEADER_ONLY)
57# include <boost/asio/impl/multiple_exceptions.ipp>
58#endif // defined(BOOST_ASIO_HEADER_ONLY)
59
60#endif // BOOST_ASIO_MULTIPLE_EXCEPTIONS_HPP