summaryrefslogtreecommitdiff
path: root/include/cppunit/TestCaller.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cppunit/TestCaller.h')
-rw-r--r--include/cppunit/TestCaller.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/cppunit/TestCaller.h b/include/cppunit/TestCaller.h
index 7853019..3b10985 100644
--- a/include/cppunit/TestCaller.h
+++ b/include/cppunit/TestCaller.h
@@ -33,13 +33,13 @@ struct ExpectedExceptionTraits
static void expectedException()
{
#if CPPUNIT_USE_TYPEINFO_NAME
- std::string message( "Expected exception of type " );
- message += TypeInfoHelper::getClassName( typeid( ExceptionType ) );
- message += ", but got none";
+ throw Exception( Message(
+ "expected exception not thrown",
+ "Expected exception type: " +
+ TypeInfoHelper::getClassName( typeid( ExceptionType ) ) ) );
#else
- std::string message( "Expected exception but got none" );
+ throw Exception( "expected exception not thrown" );
#endif
- throw Exception( message );
}
};