diff --git a/fmt/ostream.h b/fmt/ostream.h index ef5e2efe..6848aac2 100644 --- a/fmt/ostream.h +++ b/fmt/ostream.h @@ -80,6 +80,7 @@ void format_arg(BasicFormatter &f, internal::FormatBuf format_buf(buffer); std::basic_ostream output(&format_buf); + output.exceptions(std::ios_base::failbit | std::ios_base::badbit); output << value; BasicStringRef str(&buffer[0], buffer.size());