diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-01-12 12:27:34 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-01-12 12:27:34 +0000 |
| commit | 8a9d921465f80e231f9e1a99a0d93beafb474402 (patch) | |
| tree | 85963269afe6e95da564e23f4c2da61c023c9a97 /src/HttpSkipResponseCommand.cc | |
| parent | 0a4f43d0edeefb5bc49329b791984c7b2072d1df (diff) | |
2009-01-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Applied exit-status patch from Pascal Rigaux at Mandriva. aria2
now returns last error encountered in the HTTP/FTP downloads as
a exit status value. If all downloads finished successfully,
aria2 returns 0. The error code is defined in
src/DownloadResult.h.
The error occurred in the download currently in progress is not
reported as a last error. If no error has encountered but there
are in progress or waiting downloads, aria2 returns 7.
* src/AbstractCommand.cc
* src/DlAbortEx.h
* src/DlRetryEx.h
* src/DownloadCommand.cc
* src/DownloadFailureException.h
* src/DownloadResult.h
* src/FtpNegotiationCommand.cc
* src/HttpSkipResponseCommand.cc
* src/Makefile.am
* src/MultiUrlRequestInfo.cc
* src/MultiUrlRequestInfo.h
* src/RecoverableException.h
* src/RequestGroup.cc
* src/RequestGroup.h
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/URIResult.cc
* src/URIResult.h
* src/main.cc
* src/option_processing.cc
* test/RequestGroupTest.cc
Diffstat (limited to 'src/HttpSkipResponseCommand.cc')
| -rw-r--r-- | src/HttpSkipResponseCommand.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/HttpSkipResponseCommand.cc b/src/HttpSkipResponseCommand.cc index f1ae1f03..358217c9 100644 --- a/src/HttpSkipResponseCommand.cc +++ b/src/HttpSkipResponseCommand.cc @@ -160,7 +160,8 @@ bool HttpSkipResponseCommand::processResponse() if(_httpResponse->getResponseStatus() == HttpHeader::S401) { throw DlAbortEx(EX_AUTH_FAILED); }else if(_httpResponse->getResponseStatus() == HttpHeader::S404) { - throw DlAbortEx(MSG_RESOURCE_NOT_FOUND); + throw DlAbortEx(MSG_RESOURCE_NOT_FOUND, + DownloadResult::RESOURCE_NOT_FOUND); } else { throw DlAbortEx(StringFormat(EX_BAD_STATUS, Util::parseUInt(_httpResponse->getResponseStatus())).str()); } |
