From 0cd2c51138a4e5ebc3fc6e7fb4c5435a79a9f69c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 8 Jun 2025 00:31:14 +0200 Subject: Better handling / presentation of network errors during uploads. --- src/lib/curl_uploader.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/curl_uploader.cc') diff --git a/src/lib/curl_uploader.cc b/src/lib/curl_uploader.cc index bdbdb098f..18d4f9166 100644 --- a/src/lib/curl_uploader.cc +++ b/src/lib/curl_uploader.cc @@ -26,6 +26,7 @@ #include "cross.h" #include "compose.hpp" #include "dcpomatic_assert.h" +#include #include #include "i18n.h" @@ -121,8 +122,8 @@ CurlUploader::upload_file(boost::filesystem::path from, boost::filesystem::path auto const r = curl_easy_perform(_curl); if (r != CURLE_OK) { throw NetworkError( - String::compose(_("Could not write to remote file %1"), to.generic_string()), - string(curl_easy_strerror(r)) + _("Could not write to remote file"), + fmt::format(_("File: {} error: {}"), to.generic_string(), string(curl_easy_strerror(r))) ); } -- cgit v1.2.3