Commit 3f653ebe authored by Hannes Roth's avatar Hannes Roth Committed by Alecs King

(Wangle) Catch all exceptions in `then() -> Future`

Summary: Saw this while debugging some stuff. Just an oversight, right?

Test Plan: Ran all the tests.

Reviewed By: hans@fb.com

Subscribers: folly-diffs@, jsedgwick, yfeldblum

FB internal diff: D1843016

Signature: t1:1843016:1423704557:d9fdb4b879ab4fcfda54a5fcb16a639df15872b5
parent 7d2497f0
......@@ -192,6 +192,8 @@ Future<T>::thenImplementation(F func, detail::argResult<isTry, F, Args...>) {
p->fulfilTry(std::move(b));
});
} catch (const std::exception& e) {
p->setException(exception_wrapper(std::current_exception(), e));
} catch (...) {
p->setException(exception_wrapper(std::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