Wrap calls to fmt::format to catch formatting exceptions
[lttng-tools.git] / src / common / eventfd.cpp
index 6858526825b6af3e278655eee3053f1cf10209dd..cb12a51ab4f3c07928b23336a5e332d9edb376bc 100644 (file)
@@ -36,7 +36,7 @@ void lttng::eventfd::increment(std::uint64_t value)
        try {
                write(&value, sizeof(value));
        } catch (const std::exception& e) {
-               LTTNG_THROW_ERROR(fmt::format("Failed to increment eventfd: {}", e.what()));
+               LTTNG_THROW_ERROR(lttng::format("Failed to increment eventfd: {}", e.what()));
        }
 }
 
@@ -47,7 +47,7 @@ std::uint64_t lttng::eventfd::decrement()
        try {
                read(&value, sizeof(value));
        } catch (const std::exception& e) {
-               LTTNG_THROW_ERROR(fmt::format("Failed to decrement eventfd: {}", e.what()));
+               LTTNG_THROW_ERROR(lttng::format("Failed to decrement eventfd: {}", e.what()));
        }
 
        return value;
This page took 0.028166 seconds and 4 git commands to generate.