diff options
author | B Stack <bgstack15@gmail.com> | 2020-04-18 17:00:42 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-04-18 17:00:42 +0000 |
commit | b4ecf755bad016b0d7fbb277106887f405f6b600 (patch) | |
tree | 8cfcea5441be72ad92095a3887ded84d38f9ba11 /libcurl | |
parent | Merge branch '10.22' into 'master' (diff) | |
parent | add upstream 10.23 (diff) | |
download | FreeFileSync-10.23.tar.gz FreeFileSync-10.23.tar.bz2 FreeFileSync-10.23.zip |
Merge branch '10.23' into 'master'10.23
add upstream 10.23
See merge request opensource-tracking/FreeFileSync!20
Diffstat (limited to 'libcurl')
-rw-r--r-- | libcurl/curl_wrap.h | 2 | ||||
-rw-r--r-- | libcurl/rest.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libcurl/curl_wrap.h b/libcurl/curl_wrap.h index 40694e71..40a330ef 100644 --- a/libcurl/curl_wrap.h +++ b/libcurl/curl_wrap.h @@ -151,7 +151,7 @@ void applyCurlOptions(CURL* easyHandle, const std::vector<CurlOption>& options) { const CURLcode rc = ::curl_easy_setopt(easyHandle, opt.option, opt.value); if (rc != CURLE_OK) - throw SysError(formatSystemError(L"curl_easy_setopt " + numberTo<std::wstring>(static_cast<int>(opt.option)), + throw SysError(formatSystemError("curl_easy_setopt(" + numberTo<std::string>(static_cast<int>(opt.option)) + ")", formatCurlStatusCode(rc), utfTo<std::wstring>(::curl_easy_strerror(rc)))); } } diff --git a/libcurl/rest.cpp b/libcurl/rest.cpp index 0d14dfc2..9b609935 100644 --- a/libcurl/rest.cpp +++ b/libcurl/rest.cpp @@ -33,7 +33,7 @@ HttpSession::Result HttpSession::perform(const std::string& serverRelPath, { easyHandle_ = ::curl_easy_init(); if (!easyHandle_) - throw SysError(formatSystemError(L"curl_easy_init", formatCurlStatusCode(CURLE_OUT_OF_MEMORY), std::wstring())); + throw SysError(formatSystemError("curl_easy_init", formatCurlStatusCode(CURLE_OUT_OF_MEMORY), L"")); } else ::curl_easy_reset(easyHandle_); @@ -168,7 +168,7 @@ HttpSession::Result HttpSession::perform(const std::string& serverRelPath, std::wstring errorMsg = trimCpy(utfTo<std::wstring>(curlErrorBuf)); //optional if (httpStatus != 0) //optional - errorMsg += (errorMsg.empty() ? L"" : L"\n") + formatHttpStatus(httpStatus); + errorMsg += (errorMsg.empty() ? L"" : L"\n") + formatHttpError(httpStatus); #if 0 //utfTo<std::wstring>(::curl_easy_strerror(ec)) is uninteresting //use CURLINFO_OS_ERRNO ?? https://curl.haxx.se/libcurl/c/CURLINFO_OS_ERRNO.html @@ -177,7 +177,7 @@ HttpSession::Result HttpSession::perform(const std::string& serverRelPath, if (nativeErrorCode != 0) errorMsg += (errorMsg.empty() ? L"" : L"\n") + std::wstring(L"Native error code: ") + numberTo<std::wstring>(nativeErrorCode); #endif - throw SysError(formatSystemError(L"curl_easy_perform", formatCurlStatusCode(rcPerf), errorMsg)); + throw SysError(formatSystemError("curl_easy_perform", formatCurlStatusCode(rcPerf), errorMsg)); } lastSuccessfulUseTime_ = std::chrono::steady_clock::now(); |