File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -277,14 +277,17 @@ struct curlFileTransfer : public FileTransfer
277277 return ((TransferItem *) userp)->headerCallback (contents, size, nmemb);
278278 }
279279
280- int progressCallback (curl_off_t dltotal, curl_off_t dlnow)
281- {
282- try {
283- act.progress (dlnow, dltotal);
284- } catch (nix::Interrupted &) {
285- assert (getInterrupted ());
286- }
280+ int progressCallback (curl_off_t dltotal, curl_off_t dlnow) noexcept
281+ try {
282+ act.progress (dlnow, dltotal);
287283 return getInterrupted ();
284+ } catch (nix::Interrupted &) {
285+ assert (getInterrupted ());
286+ return 1 ;
287+ } catch (...) {
288+ /* Something unexpected has happened like logger throwing an exception. */
289+ callbackException = std::current_exception ();
290+ return 1 ;
288291 }
289292
290293 static int progressCallbackWrapper (
You can’t perform that action at this time.
0 commit comments