Semi-closed handles and I/O errors: misleading documentation?

In the documentation for System.IO http://hackage.haskell.org/package/base-4.8.1.0/docs/System-IO.html, we find the following assertion: Any I/O errors encountered while a handle is semi-closed are simply discarded. also this other one: Encoding and decoding errors are always detected and reported, except during lazy I/O (hGetContents, getContents, and readFile), where a decoding error merely results in termination of the character stream, as with other I/O errors. Is this really correct, though? This SO question http://stackoverflow.com/questions/16257037/detecting-i-o-exceptions-in-a-la... says that exceptions found during lazy I/O are thrown from pure code, and a small experiment http://stackoverflow.com/a/33985047/1364288 seems to confirm it. I personally prefer that behaviour, by the way. Perhaps the documentation should be updated?
participants (1)
-
Daniel Díaz