1 #include "artdaq-core/Utilities/ExceptionStackTrace.hh"
3 #define BOOST_TEST_MODULE ExceptionStackTrace_t
4 #include "cetlib/quiet_unit_test.hpp"
6 #define TRACE_NAME "ExceptionStackTrace_t"
7 #include "TRACE/tracemf.h"
9 BOOST_AUTO_TEST_SUITE(ExceptionStackTrace_test)
14 void PrintExceptionStackTrace()
18 std::string::size_type pos = 0;
19 std::string::size_type prev = 0;
21 while ((pos = message.find(
'\n', prev)) != std::string::npos)
23 TLOG(TLVL_DEBUG) << message.substr(prev, pos - prev);
27 TLOG(TLVL_DEBUG) << message.substr(prev);
30 BOOST_AUTO_TEST_CASE(PrintStackTrace)
38 PrintExceptionStackTrace();
42 BOOST_AUTO_TEST_SUITE_END()
std::string print_stacktrace()
Produces a stack trace summary.