diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-06-24 21:06:37 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-06-24 21:06:37 +0200 |
commit | 15fa70cd1b853f5e62662b99ccb9ef3da6cfadff (patch) | |
tree | bf89501471242f1595b9779249878037d43d8604 | |
parent | 96c6b08ed7f99be84cb1816515a368392d19dbb5 (diff) |
Downloader: Propagate exceptions from decompressionSink->finish()
-rw-r--r-- | src/libstore/download.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc index 571c194ec..70cfaf0dd 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -311,8 +311,13 @@ struct CurlDownloader : public Downloader debug("finished %s of '%s'; curl status = %d, HTTP status = %d, body = %d bytes", request.verb(), request.uri, code, httpStatus, result.bodySize); - if (decompressionSink) - decompressionSink->finish(); + if (decompressionSink) { + try { + decompressionSink->finish(); + } catch (...) { + writeException = std::current_exception(); + } + } if (code == CURLE_WRITE_ERROR && result.etag == request.expectedETag) { code = CURLE_OK; |