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/cloud/onedrive | |
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/cloud/onedrive')
4 files changed, 5 insertions, 5 deletions
diff --git a/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp b/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp index f7e995f332..e38d278559 100644 --- a/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp +++ b/backends/cloud/onedrive/onedrivecreatedirectoryrequest.cpp @@ -96,7 +96,7 @@ void OneDriveCreateDirectoryRequest::responseCallback(Networking::JsonResponse r if (response.request) _date = response.request->date(); - Networking::ErrorResponse error(this); + Networking::ErrorResponse error(this, "OneDriveCreateDirectoryRequest::responseCallback: unknown error"); Networking::CurlJsonRequest *rq = (Networking::CurlJsonRequest *)response.request; if (rq && rq->getNetworkReadStream()) error.httpResponseCode = rq->getNetworkReadStream()->httpResponseCode(); diff --git a/backends/cloud/onedrive/onedrivelistdirectoryrequest.cpp b/backends/cloud/onedrive/onedrivelistdirectoryrequest.cpp index f16097680b..0bf57a6317 100644 --- a/backends/cloud/onedrive/onedrivelistdirectoryrequest.cpp +++ b/backends/cloud/onedrive/onedrivelistdirectoryrequest.cpp @@ -102,7 +102,7 @@ void OneDriveListDirectoryRequest::listedDirectoryCallback(Networking::JsonRespo if (response.request) _date = response.request->date(); - Networking::ErrorResponse error(this); + Networking::ErrorResponse error(this, "OneDriveListDirectoryRequest::listedDirectoryCallback: unknown error"); Networking::CurlJsonRequest *rq = (Networking::CurlJsonRequest *)response.request; if (rq && rq->getNetworkReadStream()) error.httpResponseCode = rq->getNetworkReadStream()->httpResponseCode(); diff --git a/backends/cloud/onedrive/onedrivetokenrefresher.cpp b/backends/cloud/onedrive/onedrivetokenrefresher.cpp index 10992c5927..b456732233 100644 --- a/backends/cloud/onedrive/onedrivetokenrefresher.cpp +++ b/backends/cloud/onedrive/onedrivetokenrefresher.cpp @@ -41,7 +41,7 @@ void OneDriveTokenRefresher::tokenRefreshed(Storage::BoolResponse response) { if (!response.value) { //failed to refresh token, notify user with NULL in original callback warning("OneDriveTokenRefresher: failed to refresh token"); - finishError(Networking::ErrorResponse(this, false, true, "", -1)); + finishError(Networking::ErrorResponse(this, false, true, "OneDriveTokenRefresher::tokenRefreshed: failed to refresh token", -1)); return; } diff --git a/backends/cloud/onedrive/onedriveuploadrequest.cpp b/backends/cloud/onedrive/onedriveuploadrequest.cpp index 85e0525069..5e7011a6e9 100644 --- a/backends/cloud/onedrive/onedriveuploadrequest.cpp +++ b/backends/cloud/onedrive/onedriveuploadrequest.cpp @@ -56,12 +56,12 @@ void OneDriveUploadRequest::start() { _workingRequest->finish(); if (_contentsStream == nullptr) { warning("OneDriveUploadRequest: cannot restart because no stream given"); - finishError(Networking::ErrorResponse(this, false, true, "No stream given", -1)); + finishError(Networking::ErrorResponse(this, false, true, "OneDriveUploadRequest::start: can't restart, because no stream given", -1)); return; } if (!_contentsStream->seek(0)) { warning("OneDriveUploadRequest: cannot restart because stream couldn't seek(0)"); - finishError(Networking::ErrorResponse(this, false, true, "", -1)); + finishError(Networking::ErrorResponse(this, false, true, "OneDriveUploadRequest::start: can't restart, because seek(0) didn't work", -1)); return; } _ignoreCallback = false; |