try_and_catch
Summary: A helper function to do try/catch on multiple exception types and store the ressult in an exception_wrapper. The purpose of this function is to best effort mimic std::current_exception(). Unlike std::current_exception(), we need to specify the types that we expect to see. Rather than writing macros or several lines per exception type to capture the exception into an exception_wrapper, this function makes writing try/catch blocks for this purpose very easy. Test Plan: unit test Reviewed By: mhorowitz@fb.com FB internal diff: D1308511 @override-unit-failures
Showing
Please register or sign in to comment