1
1
Fork 0
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:
Sergei Zimmerman 2025-11-19 01:51:16 +03:00
parent b3dfe37aea
commit bd0b338e15
No known key found for this signature in database

View file

@ -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