src/detail/except.cpp

100.0% Lines (9/9) 100.0% List of functions (3/3) 100.0% Branches (3/3)
except.cpp
f(x) Functions (3)
Line Branch TLA Hits Source Code
1 //
2 // Copyright (c) 2026 Mohammad Nejati
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/burl
8 //
9
10 #include "except.hpp"
11
12 #include <boost/throw_exception.hpp>
13
14 #include <stdexcept>
15
16 namespace boost
17 {
18 namespace burl
19 {
20 namespace detail
21 {
22
23 void
24 2x throw_invalid_argument(
25 char const* what,
26 source_location const& loc)
27 {
28 2x throw_exception(
29
1/1
✓ Branch 1 taken 2 times.
4x std::invalid_argument(what), loc);
30 }
31
32 void
33 54x throw_length_error(
34 char const* what,
35 source_location const& loc)
36 {
37 54x throw_exception(
38
1/1
✓ Branch 1 taken 54 times.
108x std::length_error(what), loc);
39 }
40
41 void
42 2x throw_out_of_range(
43 char const* what,
44 source_location const& loc)
45 {
46 2x throw_exception(
47
1/1
✓ Branch 1 taken 2 times.
4x std::out_of_range(what), loc);
48 }
49
50 } // namespace detail
51 } // namespace burl
52 } // namespace boost
53