GCC Code Coverage Report


Directory: libs/beast2/
File: src/detail/except.cpp
Date: 2025-11-13 15:50:44
Exec Total Coverage
Lines: 4 6 66.7%
Functions: 2 3 66.7%
Branches: 2 8 25.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/cppalliance/beast2
8 //
9
10 #include <boost/beast2/detail/config.hpp>
11 #include <boost/beast2/detail/except.hpp>
12 #include <boost/throw_exception.hpp>
13 #include <stdexcept>
14 #include <typeinfo>
15
16 namespace boost {
17 namespace beast2 {
18 namespace detail {
19
20 void
21 1 throw_bad_typeid(
22 source_location const& loc)
23 {
24 1 throw_exception(std::bad_typeid(), loc);
25 }
26
27 void
28 4 throw_invalid_argument(
29 core::string_view s,
30 source_location const& loc)
31 {
32
2/4
✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
12 throw_exception(std::invalid_argument(s), loc);
33 }
34
35 void
36 throw_logic_error(
37 core::string_view s,
38 source_location const& loc)
39 {
40 throw_exception(std::logic_error(s), loc);
41 }
42
43 } // detail
44 } // beast2
45 } // boost
46