| 31 | |
| 32 | #include <stdexcept> |
| 33 | BOOST_NOINLINE void oops(int i) { |
| 34 | //[getting_started_throwing_with_trace |
| 35 | if (i >= 4) |
| 36 | throw_with_trace(std::out_of_range("'i' must be less than 4 in oops()")); |
| 37 | if (i <= 0) |
| 38 | throw_with_trace(std::logic_error("'i' must be greater than zero in oops()")); |
| 39 | //] |
| 40 | foo(i); |
| 41 | std::exit(1); |
| 42 | } |
| 43 | |
| 44 | #include <boost/array.hpp> |
| 45 | BOOST_NOINLINE void bar(int i) { |
no test coverage detected