From 1ef99931e131343f069a4b74edfc06196d72d85b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 27 Apr 2008 02:22:14 +0000 Subject: 2008-04-27 Tatsuhiro Tsujikawa 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. --- test/MultiFileAllocationIteratorTest.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'test/MultiFileAllocationIteratorTest.cc') diff --git a/test/MultiFileAllocationIteratorTest.cc b/test/MultiFileAllocationIteratorTest.cc index 88736670..b8c808ae 100644 --- a/test/MultiFileAllocationIteratorTest.cc +++ b/test/MultiFileAllocationIteratorTest.cc @@ -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()); } } -- cgit