Commit d8345822 authored by Qinfan Wu's avatar Qinfan Wu Committed by Facebook Github Bot

Suppress deprecation warning in Promise.h

Summary:
[Folly][coro] Suppress deprecation warning in `Promise.h`.

`Try(std::exception_ptr ep)` is deprecated. The underlying behavior doesn't improve much with this diff. But there would be a whole lot of warnings once `Promise.h` gets included by more files.

Reviewed By: andriigrynenko

Differential Revision: D7178381

fbshipit-source-id: 9f45706283a5aaa436cbab3e7b02e085bdc8c792
parent c39b0c3b
......@@ -17,6 +17,7 @@
#include <glog/logging.h>
#include <folly/ExceptionWrapper.h>
#include <folly/Try.h>
#include <folly/experimental/coro/AwaitWrapper.h>
#include <folly/experimental/coro/Task.h>
......@@ -140,7 +141,8 @@ class Promise : public PromiseBase<T> {
}
void unhandled_exception() {
this->result_ = Try<T>(std::current_exception());
this->result_ =
Try<T>(exception_wrapper::from_exception_ptr(std::current_exception()));
}
void start() {
......
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