[Haskell-cafe] Uncatchable error

Daniel Fischer daniel.is.fischer at googlemail.com
Fri Mar 11 17:21:58 CET 2011


On Friday 11 March 2011 17:04:16, Daniel Díaz wrote:
> Hi, cafe,
> 
> I'm working in a program where I use many connections with Network.HTTP.
> Sometimes, connections are closed while my program is reading them, and
> an error appears:
> 
> <socket: XXX>: Data.ByteString.hGetLine: invalid argument (Bad file
> descriptor)
> 
> All I need is to handle this error. The function 'catch' doesn't work. I
> guess this error comes from a call to 'error' function, or something
> similar.

Control.Exception.catch can catch error calls. If you're using 
Prelude.catch, you probably should switch.

> 
> What I can do?
> 
> Thanks in advance,
> Daniel Díaz
> 
> 



More information about the Haskell-Cafe mailing list