fmt does not support formatting `std::exception_ptr`, so we need to
rethrow it, so we can convert it to a known exception type.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
"{}, {} skipped, system shutdown", who, what);
return;
}
- gated_logger().error(
- "{} dispatch() {} caught exception: {}", who, what, eptr);
+ try {
+ std::rethrow_exception(eptr);
+ } catch (std::exception& e) {
+ gated_logger().error(
+ "{} dispatch() {} caught exception: {}", who, what, e.what());
+ }
assert(*eptr.__cxa_exception_type()
== typeid(seastar::gate_closed_exception));
});