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
|
@ -45,11 +45,8 @@ void DHTConnectionImplTest::testWriteAndReadData()
|
|||
CPPUNIT_ASSERT_EQUAL(message1,
|
||||
std::string(&readbuffer[0], &readbuffer[rlength]));
|
||||
}
|
||||
} catch(Exception* e) {
|
||||
std::string m = e->getMsg();
|
||||
std::cerr << *e << std::endl;
|
||||
delete e;
|
||||
CPPUNIT_FAIL(m);
|
||||
} catch(Exception& e) {
|
||||
CPPUNIT_FAIL(e.stackTrace());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue