diff options
| author | Jarda Snajdr <jsnajdr@gmail.com> | 2015-11-16 19:39:42 +0100 |
|---|---|---|
| committer | Jarda Snajdr <jsnajdr@gmail.com> | 2015-11-18 14:54:29 +0100 |
| commit | 06b8874a49a03ac51e687c8eaf0631cab70e21f3 (patch) | |
| tree | 32861303167a27ae4e719bc2c633612a09924a81 /src/AbstractCommand.cc | |
| parent | 9bce4eb925794528b21b4cdb0f7777ac24ffd7c2 (diff) | |
Send the last error message as part of tellStatus RPC response
Diffstat (limited to 'src/AbstractCommand.cc')
| -rw-r--r-- | src/AbstractCommand.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/AbstractCommand.cc b/src/AbstractCommand.cc index 687e7881..59b92c06 100644 --- a/src/AbstractCommand.cc +++ b/src/AbstractCommand.cc @@ -343,7 +343,7 @@ bool AbstractCommand::execute() return false; } catch (DlAbortEx& err) { - requestGroup_->setLastErrorCode(err.getErrorCode()); + requestGroup_->setLastErrorCode(err.getErrorCode(), err.what()); if (req_) { A2_LOG_ERROR_EX (fmt(MSG_DOWNLOAD_ABORTED, getCuid(), req_->getUri().c_str()), @@ -376,7 +376,7 @@ bool AbstractCommand::execute() A2_LOG_ERROR_EX (fmt(MSG_DOWNLOAD_ABORTED, getCuid(), req_->getUri().c_str()), err); fileEntry_->addURIResult(req_->getUri(), err.getErrorCode()); - requestGroup_->setLastErrorCode(err.getErrorCode()); + requestGroup_->setLastErrorCode(err.getErrorCode(), err.what()); if (err.getErrorCode() == error_code::CANNOT_RESUME) { requestGroup_->increaseResumeFailureCount(); } @@ -392,7 +392,7 @@ bool AbstractCommand::execute() return prepareForRetry(0); } catch (DownloadFailureException& err) { - requestGroup_->setLastErrorCode(err.getErrorCode()); + requestGroup_->setLastErrorCode(err.getErrorCode(), err.what()); if (req_) { A2_LOG_ERROR_EX (fmt(MSG_DOWNLOAD_ABORTED, getCuid(), req_->getUri().c_str()), |
