Wrap calls to fmt::format to catch formatting exceptions
[lttng-tools.git] / src / bin / lttng-sessiond / ctf2-trace-class-visitor.cpp
index 24fe15792545f43c38120d803e56d81f51fa46ce..8da98591d6e0c731eea61d67199a8c859cef6b72 100644 (file)
@@ -205,8 +205,8 @@ private:
                        if (std::is_signed<typename EnumerationType::mapping::range_t::
                                                   range_integer_t>::value) {
                                LTTNG_THROW_ERROR(
-                                       fmt::format("Failed to serialize {}: unexpected role",
-                                                   _fragment["type"]));
+                                       lttng::format("Failed to serialize {}: unexpected role",
+                                                     _fragment["type"]));
                        }
 
                        auto role_array = json::json::array();
@@ -219,7 +219,7 @@ private:
                }
 
                if (type.mappings_->size() < 1) {
-                       LTTNG_THROW_ERROR(fmt::format(
+                       LTTNG_THROW_ERROR(lttng::format(
                                "Failed to serialize {}: enumeration must have at least one mapping",
                                _fragment["type"]));
                }
This page took 0.027244 seconds and 4 git commands to generate.