From 2c077dd44224606994f2a5569b4839324d0e3d26 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 14 Oct 2017 07:38:16 -0700 Subject: [PATCH] Enable stream exceptions (#581) --- fmt/ostream.h | 1 + 1 file changed, 1 insertion(+) 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());