mirror of
https://github.com/NixOS/nix.git
synced 2025-11-22 02:09:36 +01:00
libstore/filetransfer: Rename writeException -> callbackException
This commit is contained in:
parent
6d65f8eea2
commit
e704b8eeed
1 changed files with 5 additions and 5 deletions
|
|
@ -168,7 +168,7 @@ struct curlFileTransfer : public FileTransfer
|
||||||
std::shared_ptr<FinishSink> decompressionSink;
|
std::shared_ptr<FinishSink> decompressionSink;
|
||||||
std::optional<StringSink> errorSink;
|
std::optional<StringSink> errorSink;
|
||||||
|
|
||||||
std::exception_ptr writeException;
|
std::exception_ptr callbackException;
|
||||||
|
|
||||||
size_t writeCallback(void * contents, size_t size, size_t nmemb) noexcept
|
size_t writeCallback(void * contents, size_t size, size_t nmemb) noexcept
|
||||||
try {
|
try {
|
||||||
|
|
@ -190,7 +190,7 @@ struct curlFileTransfer : public FileTransfer
|
||||||
|
|
||||||
return realSize;
|
return realSize;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
writeException = std::current_exception();
|
callbackException = std::current_exception();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -474,7 +474,7 @@ struct curlFileTransfer : public FileTransfer
|
||||||
try {
|
try {
|
||||||
decompressionSink->finish();
|
decompressionSink->finish();
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
writeException = std::current_exception();
|
callbackException = std::current_exception();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -483,8 +483,8 @@ struct curlFileTransfer : public FileTransfer
|
||||||
httpStatus = 304;
|
httpStatus = 304;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (writeException)
|
if (callbackException)
|
||||||
failEx(writeException);
|
failEx(callbackException);
|
||||||
|
|
||||||
else if (code == CURLE_OK && successfulStatuses.count(httpStatus)) {
|
else if (code == CURLE_OK && successfulStatuses.count(httpStatus)) {
|
||||||
result.cached = httpStatus == 304;
|
result.cached = httpStatus == 304;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue