Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:58:02

0001 // Copyright (c) 2021 Klemens D. Morgenstern
0002 //
0003 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0004 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 #ifndef BOOST_PROCESS_V2_ERROR_HPP
0006 #define BOOST_PROCESS_V2_ERROR_HPP
0007 
0008 #include <boost/process/v2/detail/config.hpp>
0009 
0010 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0011 
0012 namespace error
0013 {
0014 
0015 /// Errors used for utf8 <-> UCS-2 conversions.
0016 enum utf8_conv_error
0017 {
0018     insufficient_buffer = 1,
0019     invalid_character,
0020 };
0021 
0022 extern BOOST_PROCESS_V2_DECL const error_category& get_utf8_category();
0023 static const error_category& utf8_category = get_utf8_category();
0024 
0025 extern BOOST_PROCESS_V2_DECL const error_category& get_exit_code_category();
0026 
0027 /// An error category that can be used to interpret exit codes of subprocesses.
0028 /** Currently not used by boost.process, but it might be in the future.
0029  * 
0030  * void run_my_process(filesystem::path pt, error_code & ec)
0031  * {
0032  *     process proc(pt, {});
0033  *     proc.wait();
0034  *     ec.assign(proc.native_exit_code(), error::get_exit_code_category());
0035  * }
0036  * 
0037  * */
0038 static const error_category& exit_code_category = get_exit_code_category();
0039 
0040 }
0041 
0042 BOOST_PROCESS_V2_END_NAMESPACE
0043 
0044 #if defined(BOOST_PROCESS_V2_HEADER_ONLY)
0045 
0046 #include <boost/process/v2/impl/error.ipp>
0047 
0048 #endif
0049 
0050 #endif //BOOST_PROCESS_V2_ERROR_HPP