Unverified Commit 82246b87 authored by Alexey Ochapov's avatar Alexey Ochapov Committed by GitHub

fix throw with exceptions disabled (#2647)

parent 35f60377
...@@ -707,7 +707,7 @@ FMT_INLINE FMT_CONSTEXPR20 digits::result grisu_gen_digits( ...@@ -707,7 +707,7 @@ FMT_INLINE FMT_CONSTEXPR20 digits::result grisu_gen_digits(
int precision_offset = exp + handler.exp10; int precision_offset = exp + handler.exp10;
if (precision_offset > 0 && if (precision_offset > 0 &&
handler.precision > max_value<int>() - precision_offset) { handler.precision > max_value<int>() - precision_offset) {
throw format_error("number is too big"); FMT_THROW(format_error("number is too big"));
} }
handler.precision += precision_offset; handler.precision += precision_offset;
// Check if precision is satisfied just by leading zeros, e.g. // Check if precision is satisfied just by leading zeros, e.g.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment