Skip to content

Commit bd0b338

Browse files
committed
libstore/filetransfer: Swallow exceptions in debugCallback
1 parent b3dfe37 commit bd0b338

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/libstore/filetransfer.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,14 @@ struct curlFileTransfer : public FileTransfer
298298
return item.progressCallback(isUpload ? ultotal : dltotal, isUpload ? ulnow : dlnow);
299299
}
300300

301-
static int debugCallback(CURL * handle, curl_infotype type, char * data, size_t size, void * userptr)
302-
{
301+
static int debugCallback(CURL * handle, curl_infotype type, char * data, size_t size, void * userptr) noexcept
302+
try {
303303
if (type == CURLINFO_TEXT)
304304
vomit("curl: %s", chomp(std::string(data, size)));
305305
return 0;
306+
} catch (...) {
307+
/* Swallow the exception. Nothing left to do. */
308+
return 0;
306309
}
307310

308311
size_t readCallback(char * buffer, size_t size, size_t nitems) noexcept

0 commit comments

Comments
 (0)