src/detail/except.cpp
33.3% Lines (2/6)
33.3% List of functions (1/3)
50.0% Branches (2/4)
Functions (3)
Function
Calls
Lines
Branches
Blocks
boost::beast2::detail::throw_bad_typeid(boost::source_location const&)
:21
0
0.0%
–
0.0%
boost::beast2::detail::throw_invalid_argument(boost::core::basic_string_view<char>, boost::source_location const&)
:28
12x
100.0%
100.0%
100.0%
boost::beast2::detail::throw_logic_error(boost::core::basic_string_view<char>, boost::source_location const&)
:36
0
0.0%
0.0%
0.0%
| Line | Branch | TLA | Hits | Source Code |
|---|---|---|---|---|
| 1 | // | |||
| 2 | // Copyright (c) 2019 Vinnie Falco ([email protected]) | |||
| 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 | ✗ | throw_bad_typeid( | ||
| 22 | source_location const& loc) | |||
| 23 | { | |||
| 24 | ✗ | throw_exception(std::bad_typeid(), loc); | ||
| 25 | } | |||
| 26 | ||||
| 27 | void | |||
| 28 | 12x | throw_invalid_argument( | ||
| 29 | core::string_view s, | |||
| 30 | source_location const& loc) | |||
| 31 | { | |||
| 32 |
2/2✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
|
36x | 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 |