Helps with the common coroutine exception-handling idiom:
std::exception_ptr ex;
try {
...
} catch (...) {
ex = std::current_exception();
}
// release resource(s)
maybe_rethrow_exception(std::move(ex));
return result;
1.4 KiB
1.4 KiB