From b148bdbeec588b90a25466954d1df2fb28f59b7a Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Tue, 17 Sep 2019 20:31:40 +0200 Subject: [PATCH] crimson: introduce make_plain_exception_future() to errorator. Signed-off-by: Radoslaw Zarzynski --- src/crimson/common/errorator.h | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.39.5