Added exception_wrapper::throw_with_nested()
Summary: This adds a missing feature. Nested exceptions are cool, see examples in https://en.cppreference.com/w/cpp/error/rethrow_if_nested (bottom of the page). In short, nested exceptions allow people to add "contextual" information to exceptions. Previously we had to write the `try { ew.throw_exception(); } catch (...) { std::throw_with_nested(xxx); }` boilerplate if we used an exception_wrapper (e.g. in futures-oriented code); with this diff, we're able to just run `ew.throw_with_nested(xxx)`. Reviewed By: yfeldblum Differential Revision: D10219994 fbshipit-source-id: cdf0fbe8e4608f6c87d326631e8ffb4919c20711
Showing
Please register or sign in to comment