summaryrefslogtreecommitdiff
path: root/src/CreateRequestCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-10-03 17:59:39 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-10-03 17:59:39 +0900
commitc81b1321122e8509b55c94c0cbca0d8d6d319f0c (patch)
treef24b49dd9cceb006172dbd09da4e5f5d3371241b /src/CreateRequestCommand.cc
parentc63fc414c389c893c80022669a7d75f3c6869c7e (diff)
parent85faafcaf233855042aead1cc522375fa7955d7e (diff)
Merge branch 'master' into random-webseeding
Diffstat (limited to 'src/CreateRequestCommand.cc')
-rw-r--r--src/CreateRequestCommand.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/CreateRequestCommand.cc b/src/CreateRequestCommand.cc
index 8db0cf56..b7b178a7 100644
--- a/src/CreateRequestCommand.cc
+++ b/src/CreateRequestCommand.cc
@@ -48,6 +48,7 @@
#include "SocketRecvBuffer.h"
#include "LogFactory.h"
#include "wallclock.h"
+#include "DownloadFailureException.h"
namespace aria2 {
@@ -94,6 +95,13 @@ bool CreateRequestCommand::executeInternal()
if(getSegmentMan()) {
getSegmentMan()->ignoreSegmentFor(getFileEntry());
}
+ if(getOption()->getAsBool(PREF_DRY_RUN)) {
+ // For dry run mode, just throwing DlAbortEx makes infinite
+ // loop, since we don't have SegmentMan, and we cannot tell all
+ // hopes were abandoned.
+ throw DOWNLOAD_FAILURE_EXCEPTION2("No URI available.",
+ getRequestGroup()->getLastErrorCode());
+ }
// In this case, the error might be already set in RequestGroup,
// so use it here.
throw DL_ABORT_EX2("No URI available.",