GCC Code Coverage Report


Directory: libs/json/include/boost/json/
File: detail/impl/except.ipp
Date: 2025-12-23 17:20:53
Exec Total Coverage
Lines: 8 8 100.0%
Functions: 2 2 100.0%
Branches: 2 2 100.0%

Line Branch Exec Source
1 //
2 // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/boostorg/json
8 //
9
10 #ifndef BOOST_JSON_DETAIL_IMPL_EXCEPT_IPP
11 #define BOOST_JSON_DETAIL_IMPL_EXCEPT_IPP
12
13 #include <boost/json/detail/except.hpp>
14 #include <boost/version.hpp>
15 #include <boost/throw_exception.hpp>
16 #include <stdexcept>
17
18 namespace boost {
19 namespace json {
20
21 namespace detail {
22
23 void
24 42 throw_system_error(
25 system::error_code const& ec,
26 source_location const& loc)
27 {
28 42 throw_exception(
29
1/1
✓ Branch 1 taken 42 times.
84 system::system_error(ec),
30 loc);
31 }
32
33 void
34 27 throw_system_error(
35 error e,
36 source_location const* loc)
37 {
38 27 system::error_code ec;
39 27 ec.assign(e, loc);
40
41 27 throw_exception(
42
1/1
✓ Branch 1 taken 27 times.
81 system::system_error(ec),
43 *loc);
44 }
45
46 } // detail
47 } // namespace json
48 } // namespace boost
49
50 #endif
51