about summary refs log tree commit diff
path: root/src/libexpr/download.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-04-09T10·49+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-04-09T10·49+0200
commit4ed2187377bb915c0eac7f93f20afa3d16f79a5d (patch)
tree5742d0b717f424c7ccd4402def7a5cce8a721509 /src/libexpr/download.cc
parent1fc905ad4c6320d7625d7f9bec06e70531bb0d5f (diff)
Use cached result if there is a network error
Diffstat (limited to 'src/libexpr/download.cc')
-rw-r--r--src/libexpr/download.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/download.cc b/src/libexpr/download.cc
index 050e8d69c710..b23e3196706f 100644
--- a/src/libexpr/download.cc
+++ b/src/libexpr/download.cc
@@ -100,7 +100,7 @@ struct Curl
         CURLcode res = curl_easy_perform(curl);
         if (res == CURLE_WRITE_ERROR && etag == expectedETag) return false;
         if (res != CURLE_OK)
-            throw Error(format("unable to download ‘%1%’: %2% (%3%)")
+            throw DownloadError(format("unable to download ‘%1%’: %2% (%3%)")
                 % url % curl_easy_strerror(res) % res);
 
         long httpStatus = 0;