LCOV - code coverage report
Current view: top level - libs/url/src/detail - except.cpp (source / functions) Hit Total Coverage
Test: coverage_filtered.info Lines: 9 9 100.0 %
Date: 2024-02-29 20:02:55 Functions: 4 4 100.0 %

          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/url
       8             : //
       9             : 
      10             : #ifndef BOOST_URL_DETAIL_IMPL_EXCEPT_IPP
      11             : #define BOOST_URL_DETAIL_IMPL_EXCEPT_IPP
      12             : 
      13             : #include <boost/url/detail/config.hpp>
      14             : #include <boost/url/detail/except.hpp>
      15             : #include <boost/throw_exception.hpp>
      16             : #include <boost/system/system_error.hpp>
      17             : #include <new>
      18             : #include <stdexcept>
      19             : 
      20             : namespace boost {
      21             : namespace urls {
      22             : namespace detail {
      23             : 
      24             : void
      25          11 : throw_system_error(
      26             :     system::error_code const& ec,
      27             :     source_location const& loc)
      28             : {
      29          11 :     throw_exception(
      30          22 :         boost::system::system_error(ec), loc);
      31             : }
      32             : 
      33             : void
      34          11 : throw_errc(
      35             :     boost::system::errc::errc_t ev,
      36             :     source_location const& loc)
      37             : {
      38          11 :     throw_system_error(make_error_code(ev), loc);
      39             : }
      40             : 
      41             : void
      42           5 : throw_invalid_argument(
      43             :     source_location const& loc)
      44             : {
      45           5 :     throw_errc(boost::system::errc::invalid_argument, loc);
      46             : }
      47             : 
      48             : void
      49           6 : throw_length_error(
      50             :     source_location const& loc)
      51             : {
      52           6 :     throw_errc(boost::system::errc::value_too_large, loc);
      53             : }
      54             : 
      55             : } // detail
      56             : } // url
      57             : } // boost
      58             : 
      59             : #endif

Generated by: LCOV version 1.15