Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:38:58

0001 //
0002 // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/json
0008 //
0009 
0010 #ifndef BOOST_JSON_DETAIL_IMPL_EXCEPT_IPP
0011 #define BOOST_JSON_DETAIL_IMPL_EXCEPT_IPP
0012 
0013 #include <boost/json/detail/except.hpp>
0014 #include <boost/version.hpp>
0015 #include <boost/throw_exception.hpp>
0016 #include <stdexcept>
0017 
0018 namespace boost {
0019 namespace json {
0020 
0021 namespace detail {
0022 
0023 void
0024 throw_system_error(
0025     error_code const& ec,
0026     source_location const& loc)
0027 {
0028     throw_exception(
0029         system_error(ec),
0030         loc);
0031 }
0032 
0033 void
0034 throw_system_error(
0035     error e,
0036     source_location const* loc)
0037 {
0038     error_code ec;
0039     ec.assign(e, loc);
0040 
0041     throw_exception(
0042         system_error(ec),
0043         *loc);
0044 }
0045 
0046 } // detail
0047 } // namespace json
0048 } // namespace boost
0049 
0050 #endif