mirror of
https://github.com/NixOS/nix.git
synced 2025-11-22 02:09:36 +01:00
libstore/filetransfer: Swallow exceptions in debugCallback
This commit is contained in:
parent
b3dfe37aea
commit
bd0b338e15
1 changed files with 5 additions and 2 deletions
|
|
@ -298,11 +298,14 @@ struct curlFileTransfer : public FileTransfer
|
||||||
return item.progressCallback(isUpload ? ultotal : dltotal, isUpload ? ulnow : dlnow);
|
return item.progressCallback(isUpload ? ultotal : dltotal, isUpload ? ulnow : dlnow);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int debugCallback(CURL * handle, curl_infotype type, char * data, size_t size, void * userptr)
|
static int debugCallback(CURL * handle, curl_infotype type, char * data, size_t size, void * userptr) noexcept
|
||||||
{
|
try {
|
||||||
if (type == CURLINFO_TEXT)
|
if (type == CURLINFO_TEXT)
|
||||||
vomit("curl: %s", chomp(std::string(data, size)));
|
vomit("curl: %s", chomp(std::string(data, size)));
|
||||||
return 0;
|
return 0;
|
||||||
|
} catch (...) {
|
||||||
|
/* Swallow the exception. Nothing left to do. */
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t readCallback(char * buffer, size_t size, size_t nitems) noexcept
|
size_t readCallback(char * buffer, size_t size, size_t nitems) noexcept
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue