mirror of
https://github.com/aria2/aria2.git
synced 2026-04-02 18:59:20 +00: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:
@@ -149,11 +149,8 @@ void MultiFileAllocationIteratorTest::testAllocate()
|
||||
CPPUNIT_ASSERT_EQUAL((uint64_t)length5, File(dir+"/"+topDir+"/"+fname5).size());
|
||||
CPPUNIT_ASSERT_EQUAL(0ULL, File(dir+"/"+topDir+"/"+fname6).size());
|
||||
|
||||
} catch(Exception* e) {
|
||||
std::cerr << *e << std::endl;
|
||||
std::string m = e->getMsg();
|
||||
delete e;
|
||||
CPPUNIT_FAIL(m);
|
||||
} catch(Exception& e) {
|
||||
CPPUNIT_FAIL(e.stackTrace());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user