summaryrefslogtreecommitdiff
path: root/src/lib/curl_uploader.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-06-08 00:31:14 +0200
committerCarl Hetherington <cth@carlh.net>2025-07-09 01:16:39 +0200
commit0cd2c51138a4e5ebc3fc6e7fb4c5435a79a9f69c (patch)
treed8f427e93f685afb542057f854fb4a9caa85c94e /src/lib/curl_uploader.cc
parentafb42c9639d754a6e3520695c04c5b436c5b749b (diff)
Better handling / presentation of network errors during uploads.uploader-take2
Diffstat (limited to 'src/lib/curl_uploader.cc')
-rw-r--r--src/lib/curl_uploader.cc5
1 files changed, 3 insertions, 2 deletions
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 <fmt/format.h>
#include <iostream>
#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)))
);
}