src/corosio/src/detail/except.cpp
75.0% Lines (6/8)
75.0% List of functions (3/4)
75.0% Branches (3/4)
Functions (4)
Function
Calls
Lines
Branches
Blocks
boost::corosio::detail::throw_logic_error()
:16
0
0.0%
0.0%
0.0%
boost::corosio::detail::throw_logic_error(char const*)
:22
1x
100.0%
100.0%
80.0%
boost::corosio::detail::throw_system_error(std::error_code const&)
:28
15x
100.0%
100.0%
80.0%
boost::corosio::detail::throw_system_error(std::error_code const&, char const*)
:34
1x
100.0%
100.0%
80.0%
| Line | Branch | TLA | Hits | Source Code |
|---|---|---|---|---|
| 1 | // | |||
| 2 | // Copyright (c) 2025 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/corosio | |||
| 8 | // | |||
| 9 | ||||
| 10 | #include <boost/corosio/detail/except.hpp> | |||
| 11 | #include <stdexcept> | |||
| 12 | ||||
| 13 | namespace boost::corosio::detail { | |||
| 14 | ||||
| 15 | void | |||
| 16 | ✗ | throw_logic_error() | ||
| 17 | { | |||
| 18 | ✗ | throw std::logic_error("logic error"); | ||
| 19 | } | |||
| 20 | ||||
| 21 | void | |||
| 22 | 1x | throw_logic_error(char const* what) | ||
| 23 | { | |||
| 24 |
1/1✓ Branch 3 → 4 taken 1 time.
|
1x | throw std::logic_error(what); | |
| 25 | } | |||
| 26 | ||||
| 27 | void | |||
| 28 | 15x | throw_system_error(std::error_code const& ec) | ||
| 29 | { | |||
| 30 |
1/1✓ Branch 3 → 4 taken 15 times.
|
15x | throw std::system_error(ec); | |
| 31 | } | |||
| 32 | ||||
| 33 | void | |||
| 34 | 1x | throw_system_error(std::error_code const& ec, char const* what) | ||
| 35 | { | |||
| 36 |
1/1✓ Branch 3 → 4 taken 1 time.
|
1x | throw std::system_error(ec, what); | |
| 37 | } | |||
| 38 | ||||
| 39 | } // namespace boost::corosio::detail | |||
| 40 |