diff options
author | Alexander Tkachev | 2019-08-25 14:30:21 +0700 |
---|---|---|
committer | Filippos Karapetis | 2019-08-25 12:15:14 +0300 |
commit | 5b5a89e3e7b880907f99675a68c5e0a8e2460470 (patch) | |
tree | 17f12e75c1da502d870cfd9313d44ee57055f56c /backends/networking | |
parent | 24b1ec0dedf31097396741aa811dfabf9335b397 (diff) | |
download | scummvm-rg350-5b5a89e3e7b880907f99675a68c5e0a8e2460470.tar.gz scummvm-rg350-5b5a89e3e7b880907f99675a68c5e0a8e2460470.tar.bz2 scummvm-rg350-5b5a89e3e7b880907f99675a68c5e0a8e2460470.zip |
CLOUD: Make Network::ErrorResponse messages more verbose
This commit updates all usages of Network::ErrorResponse to specify at
least method name if not precise reason why operation failed.
Diffstat (limited to 'backends/networking')
-rw-r--r-- | backends/networking/curl/curlrequest.cpp | 2 | ||||
-rw-r--r-- | backends/networking/curl/request.cpp | 6 | ||||
-rw-r--r-- | backends/networking/curl/request.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/backends/networking/curl/curlrequest.cpp b/backends/networking/curl/curlrequest.cpp index cb117b7b7b..f7d169cdca 100644 --- a/backends/networking/curl/curlrequest.cpp +++ b/backends/networking/curl/curlrequest.cpp @@ -53,7 +53,7 @@ void CurlRequest::handle() { if (_stream && _stream->eos()) { if (_stream->httpResponseCode() != 200) { warning("CurlRequest: HTTP response code is not 200 OK (it's %ld)", _stream->httpResponseCode()); - ErrorResponse error(this, false, true, "", _stream->httpResponseCode()); + ErrorResponse error(this, false, true, "HTTP response code is not 200 OK", _stream->httpResponseCode()); finishError(error); return; } diff --git a/backends/networking/curl/request.cpp b/backends/networking/curl/request.cpp index 398af04f4b..b8393f7138 100644 --- a/backends/networking/curl/request.cpp +++ b/backends/networking/curl/request.cpp @@ -24,8 +24,8 @@ namespace Networking { -ErrorResponse::ErrorResponse(Request *rq): - request(rq), interrupted(false), failed(true), response(""), httpResponseCode(-1) {} +ErrorResponse::ErrorResponse(Request *rq, Common::String resp): + request(rq), interrupted(false), failed(true), response(resp), httpResponseCode(-1) {} ErrorResponse::ErrorResponse(Request *rq, bool interrupt, bool failure, Common::String resp, long httpCode): request(rq), interrupted(interrupt), failed(failure), response(resp), httpResponseCode(httpCode) {} @@ -50,7 +50,7 @@ void Request::handleRetry() { void Request::pause() { _state = PAUSED; } void Request::finish() { - ErrorResponse error(this, true, false, "", -1); + ErrorResponse error(this, true, false, "Request::finish() was called (i.e. interrupted)", -1); finishError(error); } diff --git a/backends/networking/curl/request.h b/backends/networking/curl/request.h index b1261f23ee..e23b677ea1 100644 --- a/backends/networking/curl/request.h +++ b/backends/networking/curl/request.h @@ -78,7 +78,7 @@ struct ErrorResponse { Common::String response; long httpResponseCode; - ErrorResponse(Request *rq); + ErrorResponse(Request *rq, Common::String resp); ErrorResponse(Request *rq, bool interrupt, bool failure, Common::String resp, long httpCode); }; |