From 9b6040c5907f7b34fa5932f8889ac0a9ee42cfc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 9 Jan 2022 23:53:40 +0100 Subject: [PATCH] Extend reporting of curl failures (#16410) --- src/openrct2/core/Http.cURL.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openrct2/core/Http.cURL.cpp b/src/openrct2/core/Http.cURL.cpp index 13d025214b..510c74c42d 100644 --- a/src/openrct2/core/Http.cURL.cpp +++ b/src/openrct2/core/Http.cURL.cpp @@ -141,7 +141,10 @@ namespace Http CURLcode curl_code = curl_easy_perform(curl); if (curl_code != CURLE_OK) { - throw std::runtime_error("Failed to perform request"); + using namespace std::literals; + throw std::runtime_error( + "Failed to perform request. curl error code: "s + std::to_string(curl_code) + ": " + + curl_easy_strerror(curl_code)); } // gets freed by curl_easy_cleanup