From: Radoslaw Zarzynski Date: Tue, 15 Oct 2019 22:32:13 +0000 (+0200) Subject: crimson: introduce make_exception_future to errorator. X-Git-Tag: v15.1.0~801^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bc61111bd094501245213911320fe2fce310ca73;p=ceph.git crimson: introduce make_exception_future to errorator. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/common/errorator.h b/src/crimson/common/errorator.h index 00b0a15d6bfa..17a95403fe6d 100644 --- a/src/crimson/common/errorator.h +++ b/src/crimson/common/errorator.h @@ -289,6 +289,7 @@ struct errorator { "no error type in errorator can be duplicated"); struct ready_future_marker{}; + struct exception_future_marker{}; private: // see the comment for `using future = _future` below. @@ -384,6 +385,10 @@ private: _future(ready_future_marker, A&&... a) : base_t(::seastar::make_ready_future(std::forward(a)...)) { } + [[gnu::always_inline]] + _future(exception_future_marker, std::exception_ptr&& ep) + : base_t(::seastar::make_exception_future(std::move(ep))) { + } template