1
#include <cppunit/Exception.h>
2
#include <cppunit/extensions/TypeInfoHelper.h>
3
#include "DefaultProtector.h"
10
DefaultProtector::protect( const Functor &functor,
11
const ProtectorContext &context )
17
catch ( Exception &failure )
19
reportFailure( context, failure );
21
catch ( std::exception &e )
23
std::string shortDescription( "uncaught exception of type " );
24
#if CPPUNIT_USE_TYPEINFO_NAME
25
shortDescription += TypeInfoHelper::getClassName( typeid(e) );
27
shortDescription += "std::exception (or derived).";
29
Message message( shortDescription, e.what() );
30
reportError( context, message );
35
Message( "uncaught exception of unknown type") );