File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -982,7 +982,10 @@ struct curlFileTransfer : public FileTransfer
982982 auto item = make_ref<TransferItem>(*this , std::move (modifiedRequest), std::move (callback));
983983 try {
984984 return enqueueItem (item);
985- } catch (const nix::Error & e) {
985+ } catch (const nix::BaseError & e) {
986+ // NOTE(cole-h): catches both nix::Error and nix::Interrupted -- enqueueItem calls
987+ // writeFull which may throw nix::Interrupted, and the rest of enqueueItem may throw
988+ // nix::Error
986989 item->fail (e);
987990 return ItemHandle (item.get_ptr ());
988991 }
@@ -991,7 +994,10 @@ struct curlFileTransfer : public FileTransfer
991994 auto item = make_ref<TransferItem>(*this , request, std::move (callback));
992995 try {
993996 return enqueueItem (item);
994- } catch (const nix::Error & e) {
997+ } catch (const nix::BaseError & e) {
998+ // NOTE(cole-h): catches both nix::Error and nix::Interrupted -- enqueueItem calls
999+ // writeFull which may throw nix::Interrupted, and the rest of enqueueItem may throw
1000+ // nix::Error
9951001 item->fail (e);
9961002 return ItemHandle (item.get_ptr ());
9971003 }
You can’t perform that action at this time.
0 commit comments