Simplify exception_ptr fallback formatting

This commit is contained in:
Victor Zverovich 2026-09-07 15:36:06 -07:00
parent 8a7aea0422
commit d3b2fac5c9

View File

@ -697,11 +697,9 @@ template <> struct formatter<std::exception_ptr> : formatter<std::exception> {
} catch (const std::exception& e) {
return formatter<std::exception>::format(e, ctx);
} catch (...) {
return this->write_padded(ctx, string_view("unknown exception"));
}
#else
return this->write_padded(ctx, string_view("unknown exception"));
#endif // FMT_USE_EXCEPTIONS
return this->write_padded(ctx, string_view("unknown exception"));
}
};