xentara-utils v2.0.4
The Xentara Utility Library
|
A class that executes a callable at destruct time, catching exceptions if necessary. More...
#include <xentara/utils/tools/Defer.hpp>
Public Member Functions | |
DeferThrowing (Callable &&callable) noexcept(std::is_nothrow_move_constructible_v< Callable >) | |
Constructor. | |
DeferThrowing (const Callable &callable) noexcept(std::is_nothrow_copy_constructible_v< Callable >) | |
Constructor. | |
~DeferThrowing () noexcept(std::is_nothrow_invocable_v< Callable >) | |
Destructor. | |
A class that executes a callable at destruct time, catching exceptions if necessary.
This class stores a callable object like a lambda and executes it at the end of the block. If the callable can throw exceptions, the exceptions are caugh during stack rollup only.
Callable | The type of the object. |
|
noexcept |
Constructor.
callable | An object that logs the exception infos |
|
noexcept |
Constructor.
callable | An object that logs the exception infos |
|
noexcept |
Destructor.
The destructor executes the callable