Daily bit(e) of C++ | std::current_exception, std::exception_ptr, std::rethrow_exception
Daily bit(e) of C++ #106, Using the C++11 exception storing and re-throwing support when implementing coroutines.
When implementing coroutines, we must decide how we want to handle exceptions.
One option is to ignore exceptions and have the unhandled_exception()
method terminate.
Alternatively, we can use the C++11 exception storing and re-throwing support:
std::current_exception
std::exception_ptr
std::rethrow_exception