dash/src/stacktraces.h
MarcoFalke db747ea384 Merge #12757: Clarify include guard naming convention
3bcc0059b8 Add lint-include-guards.sh which checks include guard consistency (practicalswift)
8fd6af89a0 Fix missing or inconsistent include guards (practicalswift)
8af65d96f4 Document include guard convention (practicalswift)

Pull request description:

  * **Documentation**: Document include guard convention
  * **Fix**: Fix missing or inconsistent include guards
  * **Regression test**: Add `lint-include-guards.sh` which checks include guard consistency

Tree-SHA512: 8171878f60fd08ccbea943a11e835195750592abb9d7ab74eaa4265ae7fac523b1da9d31ca13d6ab73dd596e49986bfb7593c696e5f39567c93e610165bc2acc
Signed-off-by: pasta <pasta@dashboost.org>

# Conflicts:
#	src/bech32.h
#	src/consensus/merkle.h
#	src/key_io.h
#	src/policy/fees.h
#	src/rpc/server.h
#	src/script/bitcoinconsensus.h
#	src/wallet/coinselection.h
2020-07-19 00:42:54 -05:00

43 lines
979 B
C++

// 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 BITCOIN_STACKTRACES_H
#define BITCOIN_STACKTRACES_H
#include <string>
#include <sstream>
#include <exception>
#include <cxxabi.h>
#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<typename T>
std::string GetExceptionWhat(const T& e);
template<>
inline std::string GetExceptionWhat(const std::exception& e)
{
return e.what();
}
// Default implementation
template<typename T>
inline std::string GetExceptionWhat(const T& e)
{
std::ostringstream s;
s << e;
return s.str();
}
void RegisterPrettyTerminateHander();
void RegisterPrettySignalHandlers();
#endif//BITCOIN_STACKTRACES_H