[Haskell-cafe] Bug in HTTP (bad internal error handling)
Claus Reinke
claus.reinke at talk21.com
Sat Oct 16 04:29:46 EDT 2010
> After it catches this error, the function returns (line 376):
>
> return (fail (show e))
>
> The "fail" is running in the Either monad (The Result type = Either).
> This calls the default Monad implementation of fail, which is just a
> call to plain old error. This basically causes the entire program to
> crash.
> Actually, it appears that simpleHTTP isn't actually supposed to throw
> an IOException, and it is instead supposed to return a ConnError
> result. So the real fix is to fix the code to make this happen. But
Sounds like a victim of
http://hackage.haskell.org/trac/ghc/ticket/4159
For mtl clients, 'fail' for 'Either' used to call 'Left'. That was
changed, though the ticket does not indicate the library
versions affected.
Claus
More information about the Haskell-Cafe
mailing list