summaryrefslogtreecommitdiff
path: root/src/HttpConnection.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-04-27 02:22:14 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-04-27 02:22:14 +0000
commit1ef99931e131343f069a4b74edfc06196d72d85b (patch)
treed640f061a66a193d5f4d92b61836161208ccff14 /src/HttpConnection.cc
parenta7952cce05a41c6e20d6eddc569a8bffe974aade (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/HttpConnection.cc')
-rw-r--r--src/HttpConnection.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HttpConnection.cc b/src/HttpConnection.cc
index 08b3c01a..0f1dd0be 100644
--- a/src/HttpConnection.cc
+++ b/src/HttpConnection.cc
@@ -112,7 +112,7 @@ void HttpConnection::sendProxyRequest(const HttpRequestHandle& httpRequest)
HttpResponseHandle HttpConnection::receiveResponse()
{
if(outstandingHttpRequests.size() == 0) {
- throw new DlAbortEx(EX_NO_HTTP_REQUEST_ENTRY_FOUND);
+ throw DlAbortEx(EX_NO_HTTP_REQUEST_ENTRY_FOUND);
}
HttpRequestEntryHandle entry = outstandingHttpRequests.front();
HttpHeaderProcessorHandle proc = entry->getHttpHeaderProcessor();
@@ -121,7 +121,7 @@ HttpResponseHandle HttpConnection::receiveResponse()
size_t size = sizeof(buf);
socket->peekData(buf, size);
if(size == 0) {
- throw new DlRetryEx(EX_INVALID_RESPONSE);
+ throw DlRetryEx(EX_INVALID_RESPONSE);
}
proc->update(buf, size);
if(!proc->eoh()) {