Fix: logging: unhandled error in *_FMT macros
[lttng-tools.git] / src / common / error.cpp
index 0bb088066466cb1ea331e849305ed783cdd990fc..cafb15f92948b8ee209fae25422ff9459a6da382 100644 (file)
@@ -16,6 +16,7 @@
 #include <lttng/lttng-error.h>
 
 #include <inttypes.h>
+#include <iostream>
 #include <pthread.h>
 #include <stdlib.h>
 #include <string.h>
@@ -452,3 +453,12 @@ void lttng_abort_on_error(void)
                abort();
        }
 }
+
+[[noreturn]] void
+lttng::logging::details::die_formatting_exception(const char *format,
+                                                 const std::exception& formatting_exception)
+{
+       std::cerr << "Error occurred while formatting logging message: msg=`" << format
+                 << "`: " << formatting_exception.what();
+       abort();
+}
This page took 0.024291 seconds and 4 git commands to generate.