diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 85680b3b..31fee070 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1404,7 +1404,7 @@ inline Int to_nonnegative_int(T value, Int upper) { template ::value)> inline Int to_nonnegative_int(T value, Int upper) { if (value < 0 || value > static_cast(upper)) - throw format_error("invalid value"); + FMT_THROW(format_error("invalid value")); return static_cast(value); }