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
8 : //
9 :
10 : #ifndef BOOST_HTTP_DETAIL_EXCEPT_HPP
11 : #define BOOST_HTTP_DETAIL_EXCEPT_HPP
12 :
13 : #include <boost/http/error.hpp>
14 : #include <boost/assert/source_location.hpp>
15 :
16 : namespace boost {
17 : namespace http {
18 : namespace detail {
19 :
20 : BOOST_HTTP_DECL void BOOST_NORETURN throw_bad_alloc(
21 0 : source_location const& loc = BOOST_CURRENT_LOCATION);
22 :
23 : BOOST_HTTP_DECL void BOOST_NORETURN throw_invalid_argument(
24 23 : source_location const& loc = BOOST_CURRENT_LOCATION);
25 :
26 : BOOST_HTTP_DECL void BOOST_NORETURN throw_invalid_argument(
27 : char const* what,
28 : source_location const& loc = BOOST_CURRENT_LOCATION);
29 :
30 : BOOST_HTTP_DECL void BOOST_NORETURN throw_length_error(
31 23 : source_location const& loc = BOOST_CURRENT_LOCATION);
32 :
33 : BOOST_HTTP_DECL void BOOST_NORETURN throw_length_error(
34 : char const* what,
35 : source_location const& loc = BOOST_CURRENT_LOCATION);
36 :
37 : BOOST_HTTP_DECL void BOOST_NORETURN throw_logic_error(
38 27 : source_location const& loc = BOOST_CURRENT_LOCATION);
39 :
40 : BOOST_HTTP_DECL void BOOST_NORETURN throw_out_of_range(
41 : source_location const& loc = BOOST_CURRENT_LOCATION);
42 :
43 : BOOST_HTTP_DECL void BOOST_NORETURN throw_runtime_error(
44 : char const* what,
45 : source_location const& loc = BOOST_CURRENT_LOCATION);
46 :
47 : BOOST_HTTP_DECL void BOOST_NORETURN throw_system_error(
48 : system::error_code const& ec,
49 14 : source_location const& loc = BOOST_CURRENT_LOCATION);
50 :
51 : BOOST_HTTP_DECL void BOOST_NORETURN throw_system_error(
52 : error e,
53 : source_location const& loc = BOOST_CURRENT_LOCATION);
54 :
55 : } // detail
56 : } // http
57 : } // boost
58 :
59 : #endif
|