Replaced more SPDLOG_THROW with throw_spdlog_ex

This commit is contained in:
gabime
2020-03-22 01:09:08 +02:00
parent d3997cc4d1
commit e1c79869b6
4 changed files with 8 additions and 9 deletions

View File

@@ -110,8 +110,7 @@ SPDLOG_INLINE void rotating_file_sink<Mutex>::rotate_()
{
file_helper_.reopen(true); // truncate the log file anyway to prevent it to grow beyond its limit!
current_size_ = 0;
SPDLOG_THROW(
spdlog_ex("rotating_file_sink: failed renaming " + filename_to_str(src) + " to " + filename_to_str(target), errno));
throw_spdlog_ex("rotating_file_sink: failed renaming " + filename_to_str(src) + " to " + filename_to_str(target), errno);
}
}
}

View File

@@ -176,7 +176,7 @@ struct eventlog
default:
// should be unreachable
SPDLOG_THROW(std::logic_error(fmt::format("Unsupported log level {}", msg.level)));
throw_spdlog_ex(fmt::format("Unsupported log level {}", msg.level));
}
}