Line |
Branch |
Exec |
Source |
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 |
|
|
|
57 |
|
|
|