Fix Windows compilation with -fno-exceptions

This commit is contained in:
Jan Hellwig 2016-10-30 02:15:51 +02:00
parent 8c63ea432c
commit b6eefe0b76

View File

@ -135,7 +135,7 @@ fmt::LongLong fmt::File::size() const {
if (size_lower == INVALID_FILE_SIZE) {
DWORD error = GetLastError();
if (error != NO_ERROR)
throw WindowsError(GetLastError(), "cannot get file size");
FMT_THROW(WindowsError(GetLastError(), "cannot get file size"));
}
fmt::ULongLong long_size = size_upper;
return (long_size << sizeof(DWORD) * CHAR_BIT) | size_lower;