src/corosio/src/detail/except.cpp
75.0% Lines (6/8)
75.0% Functions (3/4)
src/corosio/src/detail/except.cpp
| Line | Hits | Source Code |
|---|---|---|
| 1 | // | |
| 2 | // Copyright (c) 2025 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/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 | 1 | throw_logic_error(char const* what) |
| 23 | { | |
| 24 | 1 | throw std::logic_error(what); |
| 25 | } | |
| 26 | ||
| 27 | void | |
| 28 | 15 | throw_system_error(std::error_code const& ec) |
| 29 | { | |
| 30 | 15 | throw std::system_error(ec); |
| 31 | } | |
| 32 | ||
| 33 | void | |
| 34 | 2 | throw_system_error(std::error_code const& ec, char const* what) |
| 35 | { | |
| 36 | 2 | throw std::system_error(ec, what); |
| 37 | } | |
| 38 | ||
| 39 | } // namespace boost::corosio::detail | |
| 40 |