catch exception checking if url exists when network is disconnected

Leads to better failure message (or possibly fallback to another remote).
This commit is contained in:
Joey Hess 2014-01-16 21:24:17 -04:00
parent 2d9ec29154
commit 0d544649d0

View file

@ -118,7 +118,8 @@ checkKey' key us = firsthit us (Right False) $ \u -> do
#endif
DefaultDownloader -> do
headers <- getHttpHeaders
Right <$> Url.withUserAgent (Url.checkBoth u' headers $ keySize key)
Url.withUserAgent $ catchMsgIO .
Url.checkBoth u' headers (keySize key)
where
firsthit [] miss _ = return miss
firsthit (u:rest) _ a = do