OTest2
A C++ testing framework
Public Member Functions | List of all members
OTest2::ExcCatcherOrdinary Class Reference

Ordinary exception catcher handling std::exception. More...

#include <exccatcherordinary.h>

Inheritance diagram for OTest2::ExcCatcherOrdinary:
Inheritance graph
[legend]
Collaboration diagram for OTest2::ExcCatcherOrdinary:
Collaboration graph
[legend]

Public Member Functions

 ExcCatcherOrdinary ()
 Ctor. More...
 
virtual ~ExcCatcherOrdinary ()
 Dtor. More...
 
 ExcCatcherOrdinary (const ExcCatcherOrdinary &)=delete
 
ExcCatcherOrdinaryoperator= (const ExcCatcherOrdinary &)=delete
 
virtual bool catchException (const Context &context_, std::function< void(const Context &)> ftor_, std::string &message_) noexcept
 Catch unexpected exceptions. More...
 
- Public Member Functions inherited from OTest2::ExcCatcher
 ExcCatcher ()
 Ctor. More...
 
virtual ~ExcCatcher ()
 Dtor. More...
 
 ExcCatcher (const ExcCatcher &)=delete
 
ExcCatcheroperator= (const ExcCatcher &)=delete
 

Detailed Description

Ordinary exception catcher handling std::exception.

Definition at line 30 of file exccatcherordinary.h.

Constructor & Destructor Documentation

◆ ExcCatcherOrdinary() [1/2]

OTest2::ExcCatcherOrdinary::ExcCatcherOrdinary ( )

Ctor.

Definition at line 30 of file exccatcherordinary.cpp.

◆ ~ExcCatcherOrdinary()

OTest2::ExcCatcherOrdinary::~ExcCatcherOrdinary ( )
virtual

Dtor.

Definition at line 34 of file exccatcherordinary.cpp.

◆ ExcCatcherOrdinary() [2/2]

OTest2::ExcCatcherOrdinary::ExcCatcherOrdinary ( const ExcCatcherOrdinary )
delete

Member Function Documentation

◆ catchException()

bool OTest2::ExcCatcherOrdinary::catchException ( const Context context_,
std::function< void(const Context &)>  ftor_,
std::string &  message_ 
)
virtualnoexcept

Catch unexpected exceptions.

Parameters
[in]context_The OTest2 context
[in]ftor_the functional which the exceptions can occurs in.
[out]message_If an exception happens an error message is filled in.
Returns
True if an exception happens. False otherwise.

Implements OTest2::ExcCatcher.

Definition at line 38 of file exccatcherordinary.cpp.

◆ operator=()

ExcCatcherOrdinary& OTest2::ExcCatcherOrdinary::operator= ( const ExcCatcherOrdinary )
delete

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