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