Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coroutine: exception: deprecate return_exception(exception_ptr)
Following up on 1b07c80, it is still possible to silently call coroutine::return_exception with an exception_ptr, rather than calling coroutine::return_exception_ptr. This will cause the passed exception_ptr to be wrapped in yet another exception_ptr so it effectively loses its type (i.e. it won't be caught properly with: try { std::rethrow_exception(ex); } catch (some_exception& e) since the rethrown exception type is no std::exception_ptr. To encourage the proper use of coroutine::return_exception_ptr, deprecate coroutine::return_exception(std::exception_ptr) and instruct the caller to use coroutine::return_exception_ptr instead. Signed-off-by: Benny Halevy <[email protected]>
- Loading branch information