Enable stream exceptions (#581)

This commit is contained in:
Victor Zverovich 2018-02-07 07:36:15 -08:00
parent 35f8f03670
commit 64599973e9

View File

@ -90,6 +90,7 @@ template <typename Char, typename T>
void format_value(basic_buffer<Char> &buffer, const T &value) {
internal::FormatBuf<Char> format_buf(buffer);
std::basic_ostream<Char> output(&format_buf);
output.exceptions(std::ios_base::failbit | std::ios_base::badbit);
output << value;
buffer.resize(buffer.size());
}