File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -975,7 +975,10 @@ struct curlFileTransfer : public FileTransfer
975975 auto item = make_ref<TransferItem>(*this , std::move (modifiedRequest), std::move (callback));
976976 try {
977977 return enqueueItem (item);
978- } catch (const nix::Error & e) {
978+ } catch (const nix::BaseError & e) {
979+ // NOTE(cole-h): catches both nix::Error and nix::Interrupted -- enqueueItem calls
980+ // writeFull which may throw nix::Interrupted, and the rest of enqueueItem may throw
981+ // nix::Error
979982 item->fail (e);
980983 return ItemHandle (ref<Item>(std::move (item)));
981984 }
@@ -984,7 +987,10 @@ struct curlFileTransfer : public FileTransfer
984987 auto item = make_ref<TransferItem>(*this , request, std::move (callback));
985988 try {
986989 return enqueueItem (item);
987- } catch (const nix::Error & e) {
990+ } catch (const nix::BaseError & e) {
991+ // NOTE(cole-h): catches both nix::Error and nix::Interrupted -- enqueueItem calls
992+ // writeFull which may throw nix::Interrupted, and the rest of enqueueItem may throw
993+ // nix::Error
988994 item->fail (e);
989995 return ItemHandle (ref<Item>(std::move (item)));
990996 }
You can’t perform that action at this time.
0 commit comments