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

Function test_rethrow

test/test_from_exception.cpp:90–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90BOOST_NOINLINE BOOST_SYMBOL_VISIBLE void test_rethrow() {
91 try {
92 in_test_rethrow_1("test rethrow");
93 } catch (const std::exception&) {
94 auto trace = stacktrace::from_current_exception();
95 BOOST_TEST(trace);
96 std::cout << "Tarce in test_rethrow(): " << trace << '\n';
97 BOOST_TEST(to_string(trace).find("in_test_throw_1") != std::string::npos);
98 BOOST_TEST(to_string(trace).find("in_test_rethrow_1") != std::string::npos);
99 }
100}
101
102BOOST_NOINLINE BOOST_SYMBOL_VISIBLE void test_rethrow_after_other_exception() {
103 try {

Callers 1

mainFunction · 0.85

Calls 3

in_test_rethrow_1Function · 0.85
from_current_exceptionFunction · 0.85
to_stringFunction · 0.85

Tested by

no test coverage detected