throw_error.ipp 859 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright (c) 2022 Klemens D. Morgenstern
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_PROCESS_V2_DETAIL_IMPL_THROW_ERROR_IPP
  6. #define BOOST_PROCESS_V2_DETAIL_IMPL_THROW_ERROR_IPP
  7. #include <boost/process/v2/detail/config.hpp>
  8. #include <boost/process/v2/detail/throw_error.hpp>
  9. #include <boost/process/v2/detail/throw_exception.hpp>
  10. BOOST_PROCESS_V2_BEGIN_NAMESPACE
  11. namespace detail
  12. {
  13. void do_throw_error(const error_code& err)
  14. {
  15. system_error e(err);
  16. throw_exception(e);
  17. }
  18. void do_throw_error(const error_code& err, const char* location)
  19. {
  20. system_error e(err, location);
  21. throw_exception(e);
  22. }
  23. }
  24. BOOST_PROCESS_V2_END_NAMESPACE
  25. #endif //BOOST_PROCESS_V2_DETAIL_IMPL_THROW_ERROR_IPP