Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Daniel Peebles
It's a hack by design, to work around libraries that do the wrong thing. On Fri, Mar 11, 2011 at 4:07 PM, Henning Thielemann < lemm...@henning-thielemann.de> wrote: > > On Fri, 11 Mar 2011, Daniel Peebles wrote: > > Check out the spoon package on hackage. It's designed for these kinds of >> situ

Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Henning Thielemann
On Fri, 11 Mar 2011, Daniel Peebles wrote: 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) This is a hack, since 'undefined' cannot

Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Daniel Peebles
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) -Dan On Fri, Mar 11, 2011 at 11:04 AM, Daniel Díaz wrote: > Hi, cafe, > > I'm working in

Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Henning Thielemann
On Fri, 11 Mar 2011, Daniel Fischer wrote: 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: : Data.ByteString.hGetL

Re: [Haskell-cafe] Uncatchable error

2011-03-11 Thread Daniel Fischer
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: > > : Data.ByteString.hGetLine: invalid argument (Bad file >

[Haskell-cafe] Uncatchable error

2011-03-11 Thread Daniel Díaz
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: : Data.ByteString.hGetLine: invalid argument (Bad file descriptor) All I need is to handle this error. The function 'catch'