aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-03-13 06:51:15 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-03-13 06:51:15 +0100
commitb651270cd6bfdd6d7c4acf04d1a00c03bf09f03a (patch)
tree0626a6723ad2edb7a281990d8c5c8b148b83e8ef /src/util.h
parent3b092bd9b6b3953d5c3052d57e4827dbd85941fd (diff)
util: Throw tinyformat::format_error on formatting error
Throw tinyformat::format_error on formatting error instead of the `std::runtime_error`.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index c9d465954c..87eb16c91b 100644
--- a/src/util.h
+++ b/src/util.h
@@ -80,7 +80,7 @@ template<typename... Args> std::string FormatStringFromLogArgs(const char *fmt,
std::string _log_msg_; /* Unlikely name to avoid shadowing variables */ \
try { \
_log_msg_ = tfm::format(__VA_ARGS__); \
- } catch (std::runtime_error &e) { \
+ } catch (tinyformat::format_error &e) { \
/* Original format string will have newline so don't add one here */ \
_log_msg_ = "Error \"" + std::string(e.what()) + "\" while formatting log message: " + FormatStringFromLogArgs(__VA_ARGS__); \
} \