Wrap calls to fmt::format to catch formatting exceptions
[lttng-tools.git] / src / bin / lttng-sessiond / field.cpp
index 2d7f9deaca9c89b9f7916ace43407272fbc83918..94d002167556a87fe3901359a25d9f28d49c4872 100644 (file)
@@ -65,8 +65,8 @@ lst::field::field(std::string in_name, lst::type::cuptr in_type) :
        name{ std::move(in_name) }, _type{ std::move(in_type) }
 {
        if (!_type) {
-               LTTNG_THROW_ERROR(
-                       fmt::format("Invalid type used to create field: field name = `{}`", name));
+               LTTNG_THROW_ERROR(lttng::format(
+                       "Invalid type used to create field: field name = `{}`", name));
        }
 }
 
@@ -90,7 +90,7 @@ const lst::type& lst::field::get_type() const
        if (_type) {
                return *_type;
        } else {
-               LTTNG_THROW_ERROR(fmt::format(
+               LTTNG_THROW_ERROR(lttng::format(
                        "Invalid attempt to access field type after transfer: field name = `{}`",
                        name));
        }
@@ -162,7 +162,7 @@ lst::floating_point_type::floating_point_type(unsigned int in_alignment,
                return;
        }
 
-       LTTNG_THROW_INVALID_ARGUMENT_ERROR(fmt::format(
+       LTTNG_THROW_INVALID_ARGUMENT_ERROR(lttng::format(
                "Invalid exponent/mantissa values provided while creating {}", typeid(*this)));
 }
 
This page took 0.023774 seconds and 4 git commands to generate.