diff options
author | B. Stack <bgstack15@gmail.com> | 2023-09-13 13:49:38 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2023-09-13 13:49:38 -0400 |
commit | 7ed2158034ef5c26eed7fed9aa3c118d79a06fa8 (patch) | |
tree | 979e6628193f88d2140e722a3893321904869896 /zen/http.cpp | |
parent | add extra_log.h (diff) | |
download | FreeFileSync-13.0.tar.gz FreeFileSync-13.0.tar.bz2 FreeFileSync-13.0.zip |
add upstream 13.013.0
Diffstat (limited to 'zen/http.cpp')
-rw-r--r-- | zen/http.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/zen/http.cpp b/zen/http.cpp index 8cdcd65c..fcf69fb3 100644 --- a/zen/http.cpp +++ b/zen/http.cpp @@ -265,7 +265,17 @@ std::unique_ptr<HttpInputStream::Impl> sendHttpRequestImpl(const Zstring& url, else { if (httpStatus != 200) //HTTP_STATUS_OK - throw SysError(formatHttpError(httpStatus)); //e.g. "HTTP status 404: Not found." + { +#if 0 //beneficial to add error details? + std::wstring errorDetails; + try + { + errorDetails = utfTo<std::wstring>(HttpInputStream(std::move(response)).readAll(nullptr /*notifyUnbufferedIO*/)); //throw SysError + } + catch (const SysError& e) { errorDetails = e.toString(); } +#endif + throw SysError(formatHttpError(httpStatus) /*+ L' ' + errorDetails*/); //e.g. "HTTP status 404: Not found." + } return response; } |