ManaPlus
Public Member Functions | Protected Attributes
Catch::ExceptionTranslatorRegistrar::ExceptionTranslator< T > Class Template Reference
Inheritance diagram for Catch::ExceptionTranslatorRegistrar::ExceptionTranslator< T >:
Catch::IExceptionTranslator

Public Member Functions

 ExceptionTranslator (std::string(*translateFunction)(T &))
 
virtual std::string translate (ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd) const
 
- Public Member Functions inherited from Catch::IExceptionTranslator
virtual ~IExceptionTranslator ()
 

Protected Attributes

std::string(* m_translateFunction )(T &)
 

Detailed Description

template<typename T>
class Catch::ExceptionTranslatorRegistrar::ExceptionTranslator< T >

Definition at line 2578 of file catch.hpp.

Constructor & Destructor Documentation

◆ ExceptionTranslator()

template<typename T >
Catch::ExceptionTranslatorRegistrar::ExceptionTranslator< T >::ExceptionTranslator ( std::string(*)(T &)  translateFunction)
inline

Definition at line 2581 of file catch.hpp.

2582  : m_translateFunction( translateFunction )
2583  {}

Member Function Documentation

◆ translate()

template<typename T >
virtual std::string Catch::ExceptionTranslatorRegistrar::ExceptionTranslator< T >::translate ( ExceptionTranslators::const_iterator  it,
ExceptionTranslators::const_iterator  itEnd 
) const
inlinevirtual

Implements Catch::IExceptionTranslator.

Definition at line 2585 of file catch.hpp.

2585  {
2586  try {
2587  if( it == itEnd )
2588  throw;
2589  else
2590  return (*it)->translate( it+1, itEnd );
2591  }
2592  catch( T& ex ) {
2593  return m_translateFunction( ex );
2594  }
2595  }

Field Documentation

◆ m_translateFunction

template<typename T >
std::string(* Catch::ExceptionTranslatorRegistrar::ExceptionTranslator< T >::m_translateFunction) (T &)
protected

Definition at line 2598 of file catch.hpp.


The documentation for this class was generated from the following file: