Commit 3dd9d51b authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Write Promise::setException in terms of Promise::setTry

Summary: [Folly] Write `Promise::setException` in terms of `Promise::setTry`.

Reviewed By: marshallcline

Differential Revision: D8344928

fbshipit-source-id: 90e21219f054329eca7ae1a6c2ca731a16328b6f
parent 62245e00
...@@ -109,8 +109,7 @@ Promise<T>::setException(E const& e) { ...@@ -109,8 +109,7 @@ Promise<T>::setException(E const& e) {
template <class T> template <class T>
void Promise<T>::setException(exception_wrapper ew) { void Promise<T>::setException(exception_wrapper ew) {
throwIfFulfilled(); setTry(Try<T>(std::move(ew)));
core_->setResult(Try<T>(std::move(ew)));
} }
template <class T> template <class T>
......
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