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

Function test_nested

test/test_from_exception.cpp:115–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115BOOST_NOINLINE BOOST_SYMBOL_VISIBLE void test_nested() {
116 try {
117 in_test_throw_1("test_other_exception_active");
118 } catch (const std::exception&) {
119 try {
120 in_test_throw_2("test_other_exception_active 2");
121 } catch (const std::exception&) {
122 auto trace = stacktrace::from_current_exception();
123 BOOST_TEST(trace);
124 std::cout << "Tarce in test_nested(): " << trace << '\n';
125 BOOST_TEST(to_string(trace).find("in_test_throw_1") == std::string::npos);
126 BOOST_TEST(to_string(trace).find("in_test_throw_2") != std::string::npos);
127 }
128 }
129}
130
131BOOST_NOINLINE BOOST_SYMBOL_VISIBLE void test_rethrow_nested() {
132 std::exception_ptr ptr;

Callers 1

mainFunction · 0.70

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