LCOV - code coverage report
Current view: top level - json/detail/impl - except.ipp (source / functions) Coverage Total Hit
Test: coverage_remapped.info Lines: 100.0 % 8 8
Test Date: 2026-02-25 20:43:10 Functions: 100.0 % 2 2

           TLA  Line data    Source code
       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/boostorg/json
       8                 : //
       9                 : 
      10                 : #ifndef BOOST_JSON_DETAIL_IMPL_EXCEPT_IPP
      11                 : #define BOOST_JSON_DETAIL_IMPL_EXCEPT_IPP
      12                 : 
      13                 : #include <boost/json/detail/except.hpp>
      14                 : #include <boost/version.hpp>
      15                 : #include <boost/throw_exception.hpp>
      16                 : #include <stdexcept>
      17                 : 
      18                 : namespace boost {
      19                 : namespace json {
      20                 : 
      21                 : namespace detail {
      22                 : 
      23                 : void
      24 HIT          42 : throw_system_error(
      25                 :     system::error_code const& ec,
      26                 :     source_location const& loc)
      27                 : {
      28              42 :     throw_exception(
      29              84 :         system::system_error(ec),
      30                 :         loc);
      31                 : }
      32                 : 
      33                 : void
      34              27 : throw_system_error(
      35                 :     error e,
      36                 :     source_location const* loc)
      37                 : {
      38              27 :     system::error_code ec;
      39              27 :     ec.assign(e, loc);
      40                 : 
      41              27 :     throw_exception(
      42              81 :         system::system_error(ec),
      43                 :         *loc);
      44                 : }
      45                 : 
      46                 : } // detail
      47                 : } // namespace json
      48                 : } // namespace boost
      49                 : 
      50                 : #endif
        

Generated by: LCOV version 2.3