preCICE
Loading...
Searching...
No Matches
src
utils
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
7
std::string
getStacktrace
()
8
{
9
std::ostringstream strm;
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
}
getStacktrace
std::string getStacktrace()
Returns a demangled stack backtrace of the caller function.
Definition
stacktrace.cpp:7
stacktrace.hpp