exception for invalid byte sequences
Henning Thielemann
lemming at henning-thielemann.de
Thu Aug 20 21:16:38 UTC 2020
Documentation for hGetChar et.al. [1] does not mention the exception for
invalid byte sequences in the current encoding.
It seems it throws an exception called "invalid argument":
IO> h <- IO.openFile "/tmp/invalid" IO.ReadMode
IO> IO.hGetChar h
*** Exception: /tmp/invalid: hGetChar: invalid argument (invalid byte sequence)
https://hackage.haskell.org/package/base-4.14.0.0/docs/System-IO.html#v:hGetChar
More information about the Libraries
mailing list