Wrap calls to fmt::format to catch formatting exceptions
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 8 Jun 2023 18:53:15 +0000 (14:53 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 8 Jun 2023 19:18:08 +0000 (15:18 -0400)
fmt::format throws when a formatting error is encountered.
Unfortunately, we can't ensure complete coverage of all logging call
sites (e.g. error paths) and it is not desirable for such an exception
to be thrown in those cases.

The formatting error is returned as the formatted string so that it ends
up in the logs or exception messages more or less transparently.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I1cb33a5fe87221139eaf9de918b47e0397daa89c


No differences found
This page took 0.025708 seconds and 4 git commands to generate.