projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
folly/fibers/test/FibersTest.cpp: accommodate ASAN's detect_stack_use_after_return=1
[folly.git]
/
folly
/
ExceptionWrapper.h
diff --git
a/folly/ExceptionWrapper.h
b/folly/ExceptionWrapper.h
index 5f1d65a2cfa5cee6881a9ee7b62f39527fb52ac5..0d028714231fa5ad6fde57055c41b6734b13356f 100644
(file)
--- a/
folly/ExceptionWrapper.h
+++ b/
folly/ExceptionWrapper.h
@@
-29,7
+29,6
@@
#include <typeinfo>
#include <utility>
#include <typeinfo>
#include <utility>
-#include <folly/Assume.h>
#include <folly/CPortability.h>
#include <folly/Demangle.h>
#include <folly/ExceptionString.h>
#include <folly/CPortability.h>
#include <folly/Demangle.h>
#include <folly/ExceptionString.h>
@@
-37,6
+36,7
@@
#include <folly/Portability.h>
#include <folly/Traits.h>
#include <folly/Utility.h>
#include <folly/Portability.h>
#include <folly/Traits.h>
#include <folly/Utility.h>
+#include <folly/lang/Assume.h>
#ifdef __GNUC__
#pragma GCC diagnostic push
#ifdef __GNUC__
#pragma GCC diagnostic push
@@
-368,6
+368,9
@@
class exception_wrapper final {
static bool with_exception_(This& this_, Fn fn_);
public:
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 {}
//! Default-constructs an empty `exception_wrapper`
//! \post `type() == none()`
exception_wrapper() noexcept {}
@@
-643,7
+646,7
@@
inline exception_wrapper try_and_catch_(F&& f) {
return exception_wrapper(std::current_exception(), ex);
}
}
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
//! `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
@@
-684,7
+687,7
@@
template <typename... Exceptions, typename F>
exception_wrapper try_and_catch(F&& fn) {
return detail::try_and_catch_<F, Exceptions...>(std::forward<F>(fn));
}
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>
#include <folly/ExceptionWrapper-inl.h>