projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d2497f
)
(Wangle) Catch all exceptions in `then() -> Future`
author
Hannes Roth
<hannesr@fb.com>
Thu, 12 Feb 2015 18:27:33 +0000
(10:27 -0800)
committer
Alecs King
<int@fb.com>
Tue, 3 Mar 2015 03:16:53 +0000
(19:16 -0800)
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
folly/futures/Future-inl.h
patch
|
blob
|
history
diff --git
a/folly/futures/Future-inl.h
b/folly/futures/Future-inl.h
index a6f35c26643fdfbbc9dacffdca5d3dd7c179d464..77ff9fa9f9ab06ab0363a1851a011fdf02b3ec4d 100644
(file)
--- a/
folly/futures/Future-inl.h
+++ b/
folly/futures/Future-inl.h
@@
-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()));
}
}