summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-28 21:36:01 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-28 21:36:01 +0900
commit476ba70a9f64f88396f70bdd7636e0b86bbeb18e (patch)
treecd52a4a3e7f587475377733036086ac42c868bcb /test
parent45fde1adaf35fd02ef60197308db96f256791337 (diff)
Moved errorCode_ from RecoverableException to Exception and added errorCode to
stackTrace. Also changed errno to errNum in stackTrace.
Diffstat (limited to 'test')
-rw-r--r--test/ExceptionTest.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/ExceptionTest.cc b/test/ExceptionTest.cc
index 86238c4e..40d8950e 100644
--- a/test/ExceptionTest.cc
+++ b/test/ExceptionTest.cc
@@ -25,15 +25,17 @@ CPPUNIT_TEST_SUITE_REGISTRATION(ExceptionTest);
void ExceptionTest::testStackTrace()
{
- DownloadFailureException c1 = DOWNLOAD_FAILURE_EXCEPTION("cause1");
+ DownloadFailureException c1 = DOWNLOAD_FAILURE_EXCEPTION2
+ ("cause1", error_code::TIME_OUT);
DownloadFailureException c2 = DOWNLOAD_FAILURE_EXCEPTION2("cause2", c1);
DownloadFailureException e = DOWNLOAD_FAILURE_EXCEPTION2("exception thrown",
c2);
CPPUNIT_ASSERT_EQUAL
- (std::string("Exception: [ExceptionTest.cc:31] exception thrown\n"
- " -> [ExceptionTest.cc:29] cause2\n"
- " -> [ExceptionTest.cc:28] cause1\n"),
+ (std::string
+ ("Exception: [ExceptionTest.cc:32] errorCode=2 exception thrown\n"
+ " -> [ExceptionTest.cc:30] errorCode=2 cause2\n"
+ " -> [ExceptionTest.cc:29] errorCode=2 cause1\n"),
e.stackTrace());
}