Moved throw to dedicated function throw_spdlog_ex

This commit is contained in:
Gabi Melman
2020-03-21 23:25:12 +02:00
parent d43a17304e
commit 3b87eb3d08
13 changed files with 32 additions and 19 deletions

View File

@@ -204,7 +204,7 @@ SPDLOG_INLINE size_t filesize(FILE *f)
{
if (f == nullptr)
{
SPDLOG_THROW(spdlog_ex("Failed getting file size. fd is null"));
throw_spdlog_ex("Failed getting file size. fd is null");
}
#if defined(_WIN32) && !defined(__CYGWIN__)
int fd = ::_fileno(f);
@@ -245,7 +245,8 @@ SPDLOG_INLINE size_t filesize(FILE *f)
}
#endif
#endif
SPDLOG_THROW(spdlog_ex("Failed getting file size from fd", errno));
throw_spdlog_ex("Failed getting file size from fd", errno);
return 0; // will not be reached.
}
// Return utc offset in minutes or throw spdlog_ex on failure