1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-22 10:19:36 +01:00

libstore/filetransfer: Set callbackException on exceptions in read/seek callbacks

This would provide better error messages if seeking/reading ever fails.
This commit is contained in:
Sergei Zimmerman 2025-11-19 01:35:54 +03:00
parent e704b8eeed
commit 1e42e55fb4
No known key found for this signature in database

View file

@ -300,6 +300,7 @@ struct curlFileTransfer : public FileTransfer
} catch (EndOfFile &) {
return 0;
} catch (...) {
callbackException = std::current_exception();
return CURL_READFUNC_ABORT;
}
@ -331,6 +332,7 @@ struct curlFileTransfer : public FileTransfer
}
return CURL_SEEKFUNC_OK;
} catch (...) {
callbackException = std::current_exception();
return CURL_SEEKFUNC_FAIL;
}