Commit 8abb78f4 authored by Ian Petersen's avatar Ian Petersen Committed by Facebook GitHub Bot

Enable building folly/Optional.h with coroutines on and exceptions off

Summary:
`folly::detail::OptionalPromise<Value>` won't build with exceptions turned off
(e.g. by passing `-fno-exceptions` on Clang's command line) because its
`unhandled_exception()` says `throw;`.  This diff replaces the `throw;` with a
call to `folly::rethrow_current_exception();`.

Reviewed By: yfeldblum

Differential Revision: D21655976

fbshipit-source-id: 5f431372f2494a09f98e3b8c36a94e8475efff29
parent c6897700
......@@ -645,7 +645,7 @@ struct OptionalPromise {
void unhandled_exception() {
// Technically, throwing from unhandled_exception is underspecified:
// https://github.com/GorNishanov/CoroutineWording/issues/17
throw;
rethrow_current_exception();
}
};
......
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