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:
parent
e704b8eeed
commit
1e42e55fb4
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue