exception for invalid byte sequences

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

exception for invalid byte sequences

Henning Thielemann

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
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries