Exception policy for e.g. fire and forget tasks.
Definition policy.h:16
std::function< void()> handler
Handler method to invoke if an exception is thrown.
Definition policy.h:18
static exception_policy handle(std::function< void()> cbfn)
Call the specified method on exception. The callback is called within the catch block.
Definition policy.h:25
static const exception_policy ignore
Noop that ignores the thrown exception. The coroutine ends at the throw point and the stack frame is ...
Definition policy.h:23
static const exception_policy terminate
The default terminate handler. Calls std::terminate() and usually ends the program.
Definition policy.h:21