From e3ad98c050adcaec827dfe83e50d8490ddb2ee4f Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Thu, 10 Apr 2025 09:48:38 +0000 Subject: [PATCH] crimson/common/errorator: move exception_comment move the comment to where __cxa_exception_type is used to keep handle() comments shorter. Signed-off-by: Matan Breizman --- src/crimson/common/errorator.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/crimson/common/errorator.h b/src/crimson/common/errorator.h index 619ecd7c6e56..1bc9ff795534 100644 --- a/src/crimson/common/errorator.h +++ b/src/crimson/common/errorator.h @@ -360,6 +360,10 @@ class maybe_handle_error_t { ErrorVisitorT errfunc; public: + // NOTE: `__cxa_exception_type()` is an extension of the language. + // It should be available both in GCC and Clang but a fallback + // (based on `std::rethrow_exception()` and `catch`) can be made + // to handle other platforms if necessary. maybe_handle_error_t(ErrorVisitorT&& errfunc, std::exception_ptr ep) : type_info(*ep.__cxa_exception_type()), result(FuturatorT::make_exception_future(std::move(ep))), @@ -403,11 +407,6 @@ public: // `catch` would allow to match against a base class as well. // However, this shouldn't be a big issue for `errorator` as Error // Visitors are already checked for exhaustiveness at compile-time. - // - // NOTE: `__cxa_exception_type()` is an extension of the language. - // It should be available both in GCC and Clang but a fallback - // (based on `std::rethrow_exception()` and `catch`) can be made - // to handle other platforms if necessary. if (type_info == ErrorT::error_t::get_exception_ptr_type_info()) { // set `state::invalid` in internals of `seastar::future` to not // call `report_failed_future()` during `operator=()`. -- 2.47.3