diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-04-27 02:22:14 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-04-27 02:22:14 +0000 |
| commit | 1ef99931e131343f069a4b74edfc06196d72d85b (patch) | |
| tree | d640f061a66a193d5f4d92b61836161208ccff14 /src/HttpHeaderProcessor.cc | |
| parent | a7952cce05a41c6e20d6eddc569a8bffe974aade (diff) | |
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.
Diffstat (limited to 'src/HttpHeaderProcessor.cc')
| -rw-r--r-- | src/HttpHeaderProcessor.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HttpHeaderProcessor.cc b/src/HttpHeaderProcessor.cc index b16d7f90..4bfb570e 100644 --- a/src/HttpHeaderProcessor.cc +++ b/src/HttpHeaderProcessor.cc @@ -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)); |
