Commit 5e84ecec authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

implement exception_wrapper::is_compatible_with<Ex> directly

Summary: Rather than implementing it via `with_exception`, which is implemented in terms of `handle`, which is complex. Works now that exact casting can always be done without `catch`.

Reviewed By: ot, luciang

Differential Revision: D27987235

fbshipit-source-id: 822b0fe168e3b55c506b88810e13573b87c381c7
parent cd2a2b28
......@@ -445,7 +445,7 @@ inline folly::fbstring exception_wrapper::class_name() const {
template <class Ex>
inline bool exception_wrapper::is_compatible_with() const noexcept {
return with_exception([](Ex const&) {});
return get_exception<Ex>();
}
[[noreturn]] inline void exception_wrapper::throw_exception() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment