mirror of https://github.com/aria2/aria2
2010-02-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that aria2 doesn't handle return value if error occurred before download begins. * src/MultiUrlRequestInfo.cc * src/main.ccpull/1/head
parent
1a04d2913e
commit
2097b5e29a
|
@ -1,3 +1,10 @@
|
|||
2010-02-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fixed the bug that aria2 doesn't handle return value if error
|
||||
occurred before download begins.
|
||||
* src/MultiUrlRequestInfo.cc
|
||||
* src/main.cc
|
||||
|
||||
2010-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Removed SegmentManFactory class.
|
||||
|
|
|
@ -190,6 +190,9 @@ downloadresultcode::RESULT MultiUrlRequestInfo::execute()
|
|||
}
|
||||
}
|
||||
} catch(RecoverableException& e) {
|
||||
if(returnValue == downloadresultcode::FINISHED) {
|
||||
returnValue = downloadresultcode::UNKNOWN_ERROR;
|
||||
}
|
||||
_logger->error(EX_EXCEPTION_CAUGHT, e);
|
||||
}
|
||||
#ifdef SIGHUP
|
||||
|
|
20
src/main.cc
20
src/main.cc
|
@ -195,7 +195,7 @@ downloadresultcode::RESULT main(int argc, char* argv[])
|
|||
SocketCore::useSelect();
|
||||
}
|
||||
downloadresultcode::RESULT exitStatus = downloadresultcode::FINISHED;
|
||||
try {
|
||||
|
||||
Logger* logger = LogFactory::getInstance();
|
||||
logger->info("<<--- --- --- ---");
|
||||
logger->info(" --- --- --- ---");
|
||||
|
@ -280,20 +280,20 @@ downloadresultcode::RESULT main(int argc, char* argv[])
|
|||
exitStatus = MultiUrlRequestInfo(requestGroups, op, getStatCalc(op),
|
||||
getSummaryOut(op)).execute();
|
||||
}
|
||||
} catch(Exception& ex) {
|
||||
std::cerr << EX_EXCEPTION_CAUGHT << "\n" << ex.stackTrace() << std::endl;
|
||||
exitStatus = downloadresultcode::UNKNOWN_ERROR;
|
||||
}
|
||||
LogFactory::release();
|
||||
return exitStatus;
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
aria2::downloadresultcode::RESULT r;
|
||||
try {
|
||||
aria2::Platform platform;
|
||||
|
||||
aria2::downloadresultcode::RESULT r = aria2::main(argc, argv);
|
||||
|
||||
r = aria2::main(argc, argv);
|
||||
} catch(aria2::Exception& ex) {
|
||||
std::cerr << EX_EXCEPTION_CAUGHT << "\n" << ex.stackTrace() << std::endl;
|
||||
r = aria2::downloadresultcode::UNKNOWN_ERROR;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue