[PATCH] Print a more friendly message when http_proxy is down.

An attempt to fix #1962. I think the exception comes from ‘connect’ in ‘Network.Socket’. I doubt that the proposed error message is friendly enough. Ideas? Also, can ‘handleJust’ catch ‘IOException’s that are not related to http_proxy?

Hi,
On 26 July 2014 00:20, Nikita Karetnikov
An attempt to fix #1962. I think the exception comes from ‘connect’ in ‘Network.Socket’.
Perhaps it's better to solve this in HTTP itself? It gives decent error messages in other cases: $ export HTTP_PROXY=foo $ cabal update Downloading the latest package list from hackage.haskell.org cabal: openTCPConnection: host lookup failure for "foo" $ export HTTP_PROXY=http://localhost:3128 $ cabal update Downloading the latest package list from hackage.haskell.org cabal: does not exist

On Sat, Jul 26, 2014 at 4:15 AM, Mikhail Glushenkov < the.dead.shall.rise@gmail.com> wrote:
On 26 July 2014 08:55, Nikita Karetnikov
wrote: What version of network is it? I ran ‘grep -r “host lookup failure”’ on the source of 2.5.0.0 and didn’t find anything.
$ cabal sandbox hc-pkg list | grep network network-2.5.0.0
It probably uses perror or something like it.
gai_strerror(3) or hstrerror(3) depending on whether ipv6 support was found or not, I'd think. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
participants (3)
-
Brandon Allbery
-
Mikhail Glushenkov
-
Nikita Karetnikov