ManaPlus
Public Member Functions | Private Attributes
doctest::detail::ExceptionTranslator< T > Class Template Reference

OCLINT destructor of virtual class. More...

#include <doctest.h>

Inheritance diagram for doctest::detail::ExceptionTranslator< T >:
doctest::detail::IExceptionTranslator

Public Member Functions

 ExceptionTranslator (String(*translateFunction)(T))
 
bool translate (String &res) const
 
- Public Member Functions inherited from doctest::detail::IExceptionTranslator
 IExceptionTranslator (const IExceptionTranslator &)=delete
 
IExceptionTranslatoroperator= (const IExceptionTranslator &)=delete
 
 IExceptionTranslator ()
 
virtual ~IExceptionTranslator ()
 

Private Attributes

String(* m_translateFunction )(T)
 

Detailed Description

template<typename T>
class doctest::detail::ExceptionTranslator< T >

OCLINT destructor of virtual class.

Definition at line 1446 of file doctest.h.

Constructor & Destructor Documentation

◆ ExceptionTranslator()

template<typename T >
doctest::detail::ExceptionTranslator< T >::ExceptionTranslator ( String(*)(T)  translateFunction)
inlineexplicit

Definition at line 1449 of file doctest.h.

1450  : m_translateFunction(translateFunction) {}

Member Function Documentation

◆ translate()

template<typename T >
bool doctest::detail::ExceptionTranslator< T >::translate ( String res) const
inlinevirtual

OCLINT parameter reassignment

OCLINT - empty catch statement

Implements doctest::detail::IExceptionTranslator.

Definition at line 1452 of file doctest.h.

1452  {
1453 #ifndef DOCTEST_CONFIG_NO_EXCEPTIONS
1454  try {
1455  throw;
1456  // cppcheck-suppress catchExceptionByValue
1457  } catch(T ex) { // NOLINT
1458  res = m_translateFunction(ex);
1459  return true;
1460  } catch(...) {}
1461 #endif // DOCTEST_CONFIG_NO_EXCEPTIONS
1462  ((void)res); // to silence -Wunused-parameter
1463  return false;
1464  }

Field Documentation

◆ m_translateFunction

template<typename T >
String(* doctest::detail::ExceptionTranslator< T >::m_translateFunction) (T)
private

Definition at line 1467 of file doctest.h.


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