preCICE v3.1.2
Loading...
Searching...
No Matches
stacktrace.cpp
Go to the documentation of this file.
1#include "stacktrace.hpp"
2#include <boost/stacktrace.hpp>
3#include <exception>
4#include <sstream>
5#include <string>
6
8{
10 try {
11 strm << boost::stacktrace::stacktrace();
12 } catch (const std::exception &e) {
13 strm << "Stacktrace failed: " << e.what();
14 }
15 return strm.str();
16}
std::string getStacktrace()
Returns a demangled stack backtrace of the caller function.
Definition stacktrace.cpp:7
T str(T... args)
T what(T... args)