mirror of
https://github.com/aria2/aria2.git
synced 2025-04-07 06:27:37 +03:00
2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten Exception class. Throw exception object, not its pointer and catch by reference, so that remove problematic delete operator for catched exception. * src/Exception.cc * src/Exception.h * test/ExceptionTest.cc * src/*: All files throwing/catching exception. * test/*: All files throwing/catching exception.
This commit is contained in:
parent
a7952cce05
commit
1ef99931e1
159 changed files with 1135 additions and 1000 deletions
|
@ -61,7 +61,7 @@ void HttpHeaderProcessor::checkHeaderLimit(size_t incomingLength)
|
|||
{
|
||||
strm.seekg(0, std::ios::end);
|
||||
if((size_t)strm.tellg()+incomingLength > _limit) {
|
||||
throw new DlAbortEx("Too large http header");
|
||||
throw DlAbortEx("Too large http header");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ SharedHandle<HttpHeader> HttpHeaderProcessor::getHttpResponseHeader()
|
|||
getline(strm, line);
|
||||
// check HTTP status value
|
||||
if(line.size() <= 12) {
|
||||
throw new DlRetryEx(EX_NO_STATUS_HEADER);
|
||||
throw DlRetryEx(EX_NO_STATUS_HEADER);
|
||||
}
|
||||
HttpHeaderHandle httpHeader(new HttpHeader());
|
||||
httpHeader->setResponseStatus(line.substr(9, 3));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue