mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Print exception origin in crash messages (#3653)
* Print exception origin in crash messages We use `PrintExceptionContinue` in many places and we pass crash origin to it as a param but we never use it. Also, change the param name to better match its meaning. * Update src/util.cpp Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com> Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
This commit is contained in:
parent
e86b1ec7ed
commit
81e25e01e0
@ -576,14 +576,9 @@ std::string HelpMessageOpt(const std::string &option, const std::string &message
|
||||
std::string("\n\n");
|
||||
}
|
||||
|
||||
static std::string FormatException(const std::exception_ptr pex, const char* pszThread)
|
||||
void PrintExceptionContinue(const std::exception_ptr pex, const char* pszExceptionOrigin)
|
||||
{
|
||||
return GetPrettyExceptionStr(pex);
|
||||
}
|
||||
|
||||
void PrintExceptionContinue(const std::exception_ptr pex, const char* pszThread)
|
||||
{
|
||||
std::string message = FormatException(pex, pszThread);
|
||||
std::string message = strprintf("\"%s\" raised an exception\n%s", pszExceptionOrigin, GetPrettyExceptionStr(pex));
|
||||
LogPrintf("\n\n************************\n%s\n", message);
|
||||
fprintf(stderr, "\n\n************************\n%s\n", message.c_str());
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ bool error(const char* fmt, const Args&... args)
|
||||
return false;
|
||||
}
|
||||
|
||||
void PrintExceptionContinue(const std::exception_ptr pex, const char* pszThread);
|
||||
void PrintExceptionContinue(const std::exception_ptr pex, const char* pszExceptionOrigin);
|
||||
void FileCommit(FILE *file);
|
||||
bool TruncateFile(FILE *file, unsigned int length);
|
||||
int RaiseFileDescriptorLimit(int nMinFD);
|
||||
|
Loading…
Reference in New Issue
Block a user