From: Radoslaw Zarzynski Date: Tue, 17 Sep 2019 18:31:40 +0000 (+0200) Subject: crimson: introduce make_plain_exception_future() to errorator. X-Git-Tag: v15.1.0~801^2~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b148bdbeec588b90a25466954d1df2fb28f59b7a;p=ceph.git crimson: introduce make_plain_exception_future() to errorator. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/common/errorator.h b/src/crimson/common/errorator.h index fc91b85fff3..f98a2a9c147 100644 --- a/src/crimson/common/errorator.h +++ b/src/crimson/common/errorator.h @@ -433,6 +433,15 @@ struct errorator { } }; + template + static auto make_plain_exception_future(ErrorT&& e) noexcept { + using decayed_t = std::decay_t; + static_assert((... || std::is_same_v), + "passing further disallowed ErrorT"); + return ::seastar::make_exception_future( + make_exception_ptr(std::forward(e))); + } + // the visitor that forwards handling of all errors to next continuation struct pass_further { template