Commit 791aa797 authored by Ian Petersen's avatar Ian Petersen Committed by Facebook GitHub Bot

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

Summary:
`folly::expected_detail::Promise<Value, Error>` 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: D21682605

fbshipit-source-id: 294752590d54b0671395982ccdeb0386a742c01e
parent 8174190b
......@@ -1455,7 +1455,7 @@ struct Promise {
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