throw spdlog_err on format errors

pull/16/head
gabime 11 years ago
parent f41d989bf0
commit 7a9781a94c

@ -574,10 +574,17 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
inline void spdlog::pattern_formatter::format(details::log_msg& msg)
{
try
{
for (auto &f : _formatters)
{
f->format(msg);
}
//write eol
msg.formatted.write(details::os::eol(), details::os::eol_size());
}
catch(const fmt::FormatError& e)
{
throw spdlog_ex(fmt::format("formatting error while processing format string: {}", e.what()));
}
}

Loading…
Cancel
Save