mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
crimson/common: print std::exception_ptr after conveting it to exception
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>
This commit is contained in:
parent
601de01501
commit
06ce350ed6
@ -31,8 +31,12 @@ class Gated {
|
||||
"{}, {} 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));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user