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

Function test_after_other_exception

test/test_from_exception.cpp:74–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74BOOST_NOINLINE BOOST_SYMBOL_VISIBLE void test_after_other_exception() {
75 try {
76 in_test_throw_1("test_other_exception_active");
77 } catch (const std::exception&) {
78 try {
79 in_test_throw_2("test_other_exception_active 2");
80 } catch (const std::exception&) {}
81
82 auto trace = stacktrace::from_current_exception();
83 BOOST_TEST(trace);
84 std::cout << "Tarce in test_after_other_exception(): " << trace;
85 BOOST_TEST(to_string(trace).find("in_test_throw_1") != std::string::npos);
86 BOOST_TEST(to_string(trace).find("in_test_throw_2") == std::string::npos);
87 }
88}
89
90BOOST_NOINLINE BOOST_SYMBOL_VISIBLE void test_rethrow() {
91 try {

Callers 1

mainFunction · 0.85

Calls 4

in_test_throw_2Function · 0.85
from_current_exceptionFunction · 0.85
to_stringFunction · 0.85
in_test_throw_1Function · 0.70

Tested by

no test coverage detected