Replace PrintException with PrintExceptionContinue + throw

Just a pet peeve.

(PrintException has exactly the same body as PrintExceptionContinue but
does a re-throw at the end. Move these re-throws to the call
site, this aids understanding what is going on as well as eliminates a
bit of code duplication in util.cpp)
This commit is contained in:
Wladimir J. van der Laan
2014-02-26 13:23:52 +01:00
parent 3480bf7c65
commit 44235713ed
3 changed files with 10 additions and 15 deletions

View File

@@ -948,15 +948,6 @@ void LogException(std::exception* pex, const char* pszThread)
LogPrintf("\n%s", message);
}
void PrintException(std::exception* pex, const char* pszThread)
{
std::string message = FormatException(pex, pszThread);
LogPrintf("\n\n************************\n%s\n", message);
fprintf(stderr, "\n\n************************\n%s\n", message.c_str());
strMiscWarning = message;
throw;
}
void PrintExceptionContinue(std::exception* pex, const char* pszThread)
{
std::string message = FormatException(pex, pszThread);