Check for errors in file_helper::flush.

pull/1920/head
Paul Kunysch 4 years ago
parent 7d48bdd2c3
commit ffb1b03943

@ -72,7 +72,10 @@ SPDLOG_INLINE void file_helper::reopen(bool truncate)
SPDLOG_INLINE void file_helper::flush()
{
std::fflush(fd_);
if (std::fflush(fd_))
{
throw_spdlog_ex("Failed flushing file " + os::filename_to_str(filename_), errno);
}
}
SPDLOG_INLINE void file_helper::close()

Loading…
Cancel
Save