From 4b50ad794422c6ecbf773141a09592fd9061a6fb Mon Sep 17 00:00:00 2001 From: st0rmbtw <61053971+st0rmbtw@users.noreply.github.com> Date: Mon, 20 Apr 2026 20:29:42 +0300 Subject: [PATCH] Replace `try` and `catch` with the `FMT_TRY` and `FMT_CATCH` macros (#4751) --- src/fmt-c.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fmt-c.cc b/src/fmt-c.cc index cb7dcc1c..5c4f4e97 100644 --- a/src/fmt-c.cc +++ b/src/fmt-c.cc @@ -31,12 +31,12 @@ extern "C" int fmt_vformat(char* buffer, size_t size, const char* fmt, default: return fmt_error_invalid_arg; } } - try { + FMT_TRY { auto result = fmt::vformat_to_n( buffer, size, fmt, fmt::format_args(format_args, static_cast(num_args))); return static_cast(result.size); - } catch (...) { } + FMT_CATCH(...) {} return fmt_error; }