Commit 64599973 authored by Victor Zverovich's avatar Victor Zverovich

Enable stream exceptions (#581)

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