// Copyright (c) 2014-2019 The Dash Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef DASH_STACKTRACES_H #define DASH_STACKTRACES_H #include #include #include #include #include "tinyformat.h" std::string DemangleSymbol(const std::string& name); std::string GetPrettyExceptionStr(const std::exception_ptr& e); std::string GetCrashInfoStrFromSerializedStr(const std::string& ciStr); template std::string GetExceptionWhat(const T& e); template<> inline std::string GetExceptionWhat(const std::exception& e) { return e.what(); } // Default implementation template inline std::string GetExceptionWhat(const T& e) { std::ostringstream s; s << e; return s.str(); } void RegisterPrettyTerminateHander(); void RegisterPrettySignalHandlers(); #endif//DASH_STACKTRACES_H