|
Cppgres
Build Postgres extensions in C++
|
Wraps a C++ function to catch exceptions and report them as Postgres errors. More...
#include <guard.hpp>
Public Member Functions | |
| exception_guard (Func f) | |
| template<typename... Args> | |
| auto | operator() (Args &&...args) -> decltype(func(std::forward< Args >(args)...)) |
Public Attributes | |
| Func | func |
Wraps a C++ function to catch exceptions and report them as Postgres errors.
It ensures that if the C++ exception throws an error, it'll be caught and transformed into a Postgres error report.
| Func | C++ function to call |