OTest2
A C++ testing framework
|
Generic exception catcher interface. More...
#include <exccatcher.h>
Public Member Functions | |
ExcCatcher () | |
Ctor. More... | |
virtual | ~ExcCatcher () |
Dtor. More... | |
ExcCatcher (const ExcCatcher &)=delete | |
ExcCatcher & | operator= (const ExcCatcher &)=delete |
virtual bool | catchException (const Context &context_, std::function< void(const Context &)> ftor_, std::string &message_) noexcept=0 |
Catch unexpected exceptions. More... | |
Generic exception catcher interface.
This interface allows to catch exceptions raised inside a code functional. It's used to catch and report unexpected exceptions inside user code or inside exception assertions. Real catcher implementation is set in the OTest2 context. User of the framework can make own implementation to adjust the framework for its environment.
Definition at line 39 of file exccatcher.h.
OTest2::ExcCatcher::ExcCatcher | ( | ) |
Ctor.
Definition at line 24 of file exccatcher.cpp.
|
virtual |
Dtor.
Definition at line 28 of file exccatcher.cpp.
|
delete |
|
pure virtualnoexcept |
Catch unexpected exceptions.
[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. |
Implemented in OTest2::ExcCatcherOrdinary.
|
delete |