Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:09

0001 // Copyright (c) 2006, 2007 Julio M. Merino Vidal
0002 // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
0003 // Copyright (c) 2009 Boris Schaeling
0004 // Copyright (c) 2010 Felipe Tanus, Boris Schaeling
0005 // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
0006 // Copyright (c) 2016 Klemens D. Morgenstern
0007 //
0008 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0009 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0010 
0011 #ifndef BOOST_PROCESS_DETAIL_INITIALIZERS_THROW_ON_ERROR_HPP
0012 #define BOOST_PROCESS_DETAIL_INITIALIZERS_THROW_ON_ERROR_HPP
0013 
0014 #include <boost/process/detail/config.hpp>
0015 #include <boost/process/detail/handler_base.hpp>
0016 
0017 namespace boost { namespace process { namespace detail {
0018 
0019 struct throw_on_error_ : ::boost::process::detail::handler
0020 {
0021     template <class Executor>
0022     void on_error(Executor& exec, const std::error_code & ec) const
0023     {
0024         throw process_error(ec, "process creation failed");
0025     }
0026 
0027     const throw_on_error_ &operator()() const {return *this;}
0028 };
0029 
0030 }
0031 
0032 constexpr boost::process::detail::throw_on_error_ throw_on_error;
0033 
0034 }}
0035 
0036 #endif