mirror of
https://github.com/fmtlib/fmt.git
synced 2026-09-13 14:22:26 +08:00
Simplify exception_ptr fallback formatting
This commit is contained in:
parent
8a7aea0422
commit
d3b2fac5c9
@ -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"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user