summaryrefslogtreecommitdiff
path: root/boost/process/detail/config.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/process/detail/config.hpp')
-rw-r--r--boost/process/detail/config.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/boost/process/detail/config.hpp b/boost/process/detail/config.hpp
index e668811cd5..dfea2c3bb7 100644
--- a/boost/process/detail/config.hpp
+++ b/boost/process/detail/config.hpp
@@ -82,6 +82,17 @@ inline void throw_last_error()
throw process_error(get_last_error());
}
+inline void throw_error(const std::error_code& ec)
+{
+ if (ec)
+ throw process_error(ec);
+}
+
+inline void throw_error(const std::error_code& ec, const char* msg)
+{
+ if (ec)
+ throw process_error(ec, msg);
+}
template<typename Char> constexpr Char null_char();
template<> constexpr char null_char<char> (){return '\0';}