mirror of https://github.com/aria2/aria2
2009-07-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added assert(!req.isNull()) when DlRetryEx is caught(this is relatively naive approach, though). For DownloadFailureException, we handle the case when req is null properly. * src/AbstractCommand.ccpull/1/head
parent
d99ec1534f
commit
b29fbb9af5
|
@ -1,3 +1,10 @@
|
|||
2009-07-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Added assert(!req.isNull()) when DlRetryEx is caught(this is
|
||||
relatively naive approach, though). For DownloadFailureException,
|
||||
we handle the case when req is null properly.
|
||||
* src/AbstractCommand.cc
|
||||
|
||||
2009-07-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Added function returning suffix of control file to
|
||||
|
|
|
@ -196,7 +196,7 @@ bool AbstractCommand::execute() {
|
|||
tryReserved();
|
||||
return true;
|
||||
} catch(DlRetryEx& err) {
|
||||
// TODO1.5 Consider the case when req is null
|
||||
assert(!req.isNull());
|
||||
logger->info(MSG_RESTARTING_DOWNLOAD,
|
||||
DL_RETRY_EX2(StringFormat
|
||||
("URI=%s", req->getCurrentUrl().c_str()).str(),err),
|
||||
|
@ -217,10 +217,11 @@ bool AbstractCommand::execute() {
|
|||
return prepareForRetry(getOption()->getAsInt(PREF_RETRY_WAIT));
|
||||
}
|
||||
} catch(DownloadFailureException& err) {
|
||||
// TODO1.5 Consider the case when req is null
|
||||
logger->error(EX_EXCEPTION_CAUGHT, err);
|
||||
_fileEntry->addURIResult(req->getUrl(), err.getCode());
|
||||
_requestGroup->setLastUriResult(req->getUrl(), err.getCode());
|
||||
if(!req.isNull()) {
|
||||
_fileEntry->addURIResult(req->getUrl(), err.getCode());
|
||||
_requestGroup->setLastUriResult(req->getUrl(), err.getCode());
|
||||
}
|
||||
_requestGroup->setHaltRequested(true);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue