LCOV - code coverage report
Current view: top level - http_proto/detail/impl - except.ipp (source / functions) Hit Total Coverage
Test: coverage_filtered.info Lines: 3 18 16.7 %
Date: 2023-01-09 16:11:12 Functions: 1 6 16.7 %

          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/CPPAlliance/http_proto
       8             : //
       9             : 
      10             : #ifndef BOOST_HTTP_PROTO_DETAIL_IMPL_EXCEPT_IPP
      11             : #define BOOST_HTTP_PROTO_DETAIL_IMPL_EXCEPT_IPP
      12             : 
      13             : #include <boost/http_proto/detail/except.hpp>
      14             : #include <boost/version.hpp>
      15             : #include <boost/throw_exception.hpp>
      16             : #include <stdexcept>
      17             : 
      18             : namespace boost {
      19             : namespace http_proto {
      20             : namespace detail {
      21             : 
      22             : void
      23           0 : throw_bad_alloc(
      24             :     source_location const& loc)
      25             : {
      26           0 :     throw_exception(
      27           0 :         std::bad_alloc(), loc);
      28             : }
      29             : 
      30             : void
      31           4 : throw_length_error(
      32             :     char const* what,
      33             :     source_location const& loc)
      34             : {
      35           4 :     throw_exception(
      36           8 :         std::length_error(what), loc);
      37             : }
      38             : 
      39             : void
      40           0 : throw_invalid_argument(
      41             :     char const* what,
      42             :     source_location const& loc)
      43             : {
      44           0 :     throw_exception(
      45           0 :         std::invalid_argument(what), loc);
      46             : }
      47             : 
      48             : void
      49           0 : throw_out_of_range(
      50             :     source_location const& loc)
      51             : {
      52           0 :     throw_exception(
      53           0 :         std::out_of_range("out of range"), loc);
      54             : }
      55             : 
      56             : void
      57           0 : throw_system_error(
      58             :     error_code const& ec,
      59             :     source_location const& loc)
      60             : {
      61           0 :     throw_exception(
      62           0 :         system_error(ec), loc);
      63             : }
      64             : 
      65             : void
      66           0 : throw_system_error(
      67             :     error e,
      68             :     source_location const& loc)
      69             : {
      70           0 :     throw_exception(
      71           0 :         system_error(e), loc);
      72             : }
      73             : 
      74             : } // detail
      75             : } // http_proto
      76             : } // boost
      77             : 
      78             : #endif

Generated by: LCOV version 1.15