[Haskell-cafe] Uncatchable error

Daniel Peebles pumpkingod at gmail.com
Fri Mar 11 21:10:32 CET 2011

Check out the spoon package on hackage. It's designed for these kinds of
situations, and will wrap up common user-generated "pure" exceptions into a
Maybe (and will return Nothing in the cases you describe)


On Fri, Mar 11, 2011 at 11:04 AM, Daniel Díaz <danieldiaz at asofilak.es>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.
> What I can do?
> Thanks in advance,
> Daniel Díaz
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110311/34de0ac5/attachment.htm>

More information about the Haskell-Cafe mailing list