1 // 2 // execution/bad_executor.hpp 3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 // 5 // Copyright (c) 2003-2021 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_EXECUTION_BAD_EXECUTOR_HPP 12 #define BOOST_ASIO_EXECUTION_BAD_EXECUTOR_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 22 namespace boost { 23 namespace asio { 24 namespace execution { 25 26 /// Exception thrown when trying to access an empty polymorphic executor. 27 class bad_executor 28 : public std::exception 29 { 30 public: 31 /// Constructor. 32 BOOST_ASIO_DECL bad_executor() BOOST_ASIO_NOEXCEPT; 33 34 /// Obtain message associated with exception. 35 BOOST_ASIO_DECL virtual const char* what() const 36 BOOST_ASIO_NOEXCEPT_OR_NOTHROW; 37 }; 38 39 } // namespace execution 40 } // namespace asio 41 } // namespace boost 42 43 #include <boost/asio/detail/pop_options.hpp> 44 45 #if defined(BOOST_ASIO_HEADER_ONLY) 46 # include <boost/asio/execution/impl/bad_executor.ipp> 47 #endif // defined(BOOST_ASIO_HEADER_ONLY) 48 49 #endif // BOOST_ASIO_EXECUTION_BAD_EXECUTOR_HPP 50