|
Cppgres
Build Postgres extensions in C++
|
Scope guard that always runs the callable on scope exit. More...
#include <guard.hpp>
Public Member Functions | |
| scope_exit (Func f, const char *warning_message) | |
| scope_exit (const scope_exit &)=delete | |
| scope_exit & | operator= (const scope_exit &)=delete |
| scope_exit (scope_exit &&)=delete | |
| scope_exit & | operator= (scope_exit &&)=delete |
Public Attributes | |
| Func | func |
| const char * | warning_message |
Scope guard that always runs the callable on scope exit.
Unlike cppgres::scope_fail, the destructor runs the callable unconditionally — on normal exit and during unwinding alike — through cppgres::ffi_guard_noexcept, so the cleanup itself never throws, degrading any failure to a WARNING with the given message.