MCPcopy Create free account
hub / github.com/boostorg/stacktrace / oops

Function oops

example/throwing_st.cpp:33–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32#include <stdexcept>
33BOOST_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>
45BOOST_NOINLINE void bar(int i) {

Callers 1

barFunction · 0.85

Calls 2

throw_with_traceFunction · 0.85
fooFunction · 0.70

Tested by

no test coverage detected