diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-02-26 20:52:24 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-02-26 20:52:39 +0100 |
| commit | b81f9718df7768d74d4c5dce1097ba74f8515a76 (patch) | |
| tree | f6308bc6971891e48d4f34b77c4aaa900673e1ce /src/util.h | |
| parent | Merge pull request #3737 from jgarzik/op-return-size (diff) | |
| parent | Replace PrintException with PrintExceptionContinue + throw (diff) | |
| download | discoin-b81f9718df7768d74d4c5dce1097ba74f8515a76.tar.xz discoin-b81f9718df7768d74d4c5dce1097ba74f8515a76.zip | |
Merge pull request #3749
4423571 Replace PrintException with PrintExceptionContinue + throw (Wladimir J. van der Laan)
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/util.h b/src/util.h index c28380a59..32bc05036 100644 --- a/src/util.h +++ b/src/util.h @@ -164,7 +164,6 @@ static inline bool error(const char* format) void LogException(std::exception* pex, const char* pszThread); -void PrintException(std::exception* pex, const char* pszThread); void PrintExceptionContinue(std::exception* pex, const char* pszThread); void ParseString(const std::string& str, char c, std::vector<std::string>& v); std::string FormatMoney(int64_t n, bool fPlus=false); @@ -558,10 +557,12 @@ template <typename Callable> void LoopForever(const char* name, Callable func, throw; } catch (std::exception& e) { - PrintException(&e, name); + PrintExceptionContinue(&e, name); + throw; } catch (...) { - PrintException(NULL, name); + PrintExceptionContinue(NULL, name); + throw; } } // .. and a wrapper that just calls func once @@ -581,10 +582,12 @@ template <typename Callable> void TraceThread(const char* name, Callable func) throw; } catch (std::exception& e) { - PrintException(&e, name); + PrintExceptionContinue(&e, name); + throw; } catch (...) { - PrintException(NULL, name); + PrintExceptionContinue(NULL, name); + throw; } } |