mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 05:27:38 +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
|
@ -124,9 +124,8 @@ void HttpHeaderProcessorTest::testGetHttpResponseHeader_empty()
|
|||
try {
|
||||
proc.getHttpResponseHeader();
|
||||
CPPUNIT_FAIL("Exception must be thrown.");
|
||||
} catch(DlRetryEx* ex) {
|
||||
std::cout << ex->getMsg() << std::endl;
|
||||
delete ex;
|
||||
} catch(DlRetryEx& ex) {
|
||||
std::cout << ex.stackTrace() << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -150,9 +149,8 @@ void HttpHeaderProcessorTest::testGetHttpResponseHeader_insufficientStatusLength
|
|||
try {
|
||||
proc.getHttpResponseHeader();
|
||||
CPPUNIT_FAIL("Exception must be thrown.");
|
||||
} catch(DlRetryEx* ex) {
|
||||
std::cout << ex->getMsg() << std::endl;
|
||||
delete ex;
|
||||
} catch(DlRetryEx& ex) {
|
||||
std::cout << ex.stackTrace() << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -170,9 +168,8 @@ void HttpHeaderProcessorTest::testBeyondLimit()
|
|||
try {
|
||||
proc.update(hd2);
|
||||
CPPUNIT_FAIL("Exception must be thrown.");
|
||||
} catch(DlAbortEx* ex) {
|
||||
std::cout << ex->getMsg() << std::endl;
|
||||
delete ex;
|
||||
} catch(DlAbortEx& ex) {
|
||||
std::cout << ex.stackTrace() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue