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

Generated by: LCOV version 1.15