-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iostreams eat exceptions by default, this can lead to incorrect/truncated result #581
Comments
vitaut
added a commit
that referenced
this issue
Oct 14, 2017
Good catch, thanks! Fixed in 2c077dd. |
an interesting thought -- what if T's op<< explicitly sets bad/fail bit instead of throwing an exception? |
¯_(ツ)_/¯. I guess it could be translated into an exception. |
Turns out in this case |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In code snippet below if
buffer
's overflow() throws an exception (e.g. std::bad_alloc) -- it is going to be silently eaten byoutput
and execution will continue.The text was updated successfully, but these errors were encountered: