MCPcopy Create free account
hub / github.com/bcndev/bytecoin / what_impl

Function what_impl

src/common/exception.cpp:8–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include <boost/core/demangle.hpp>
7
8static std::string what_impl(const std::exception &e, size_t level) {
9 std::string nested_what;
10 try {
11 std::rethrow_if_nested(e);
12 } catch (const std::exception &n) {
13 nested_what = "\n" + what_impl(n, level + 1);
14 } catch (...) {
15 nested_what = "\n...";
16 }
17 return std::string(level * 2, ' ') + e.what() + nested_what;
18}
19
20std::string common::demangle(const char *name) {
21 std::string str = boost::core::demangle(name);

Callers 1

whatMethod · 0.85

Calls 1

whatMethod · 0.45

Tested by

no test coverage detected