diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-16 21:24:17 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-16 21:24:17 -0400 |
commit | 1a1c47b0cf40fa10ae1f90caff4d77daa2e6e136 (patch) | |
tree | 5f19d1eb308abd2df6c306f042ebe217017447ec | |
parent | f25530655418ae7917bf8792adc5630c623e3881 (diff) |
catch exception checking if url exists when network is disconnected
Leads to better failure message (or possibly fallback to another remote).
-rw-r--r-- | Remote/Web.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Remote/Web.hs b/Remote/Web.hs index 975279edd..2863d9d5e 100644 --- a/Remote/Web.hs +++ b/Remote/Web.hs @@ -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 |