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
Compiler Explorer link: https://compiler-explorer.com/z/h7jPnnYbE