]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common/errorator: move exception_comment
authorMatan Breizman <mbreizma@redhat.com>
Thu, 10 Apr 2025 09:48:38 +0000 (09:48 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 22 Apr 2025 15:11:58 +0000 (15:11 +0000)
move the comment to where __cxa_exception_type is used
to keep handle() comments shorter.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/common/errorator.h

index 619ecd7c6e563a9738bac2fb01a36034f219de05..1bc9ff7955345f6626823f7c1d8791d461b5556e 100644 (file)
@@ -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=()`.