#include <typeinfo>
#include <utility>
-#include <folly/Assume.h>
#include <folly/CPortability.h>
#include <folly/Demangle.h>
#include <folly/ExceptionString.h>
#include <folly/Portability.h>
#include <folly/Traits.h>
#include <folly/Utility.h>
+#include <folly/lang/Assume.h>
#ifdef __GNUC__
#pragma GCC diagnostic push
static bool with_exception_(This& this_, Fn fn_);
public:
+ static exception_wrapper from_exception_ptr(
+ std::exception_ptr const& eptr) noexcept;
+
//! Default-constructs an empty `exception_wrapper`
//! \post `type() == none()`
exception_wrapper() noexcept {}
return exception_wrapper(std::current_exception(), ex);
}
}
-} // detail
+} // namespace detail
//! `try_and_catch` is a simple replacement for `try {} catch(){}`` that allows
//! you to specify which derived exceptions you would like to catch and store in
exception_wrapper try_and_catch(F&& fn) {
return detail::try_and_catch_<F, Exceptions...>(std::forward<F>(fn));
}
-} // folly
+} // namespace folly
#include <folly/ExceptionWrapper-inl.h>