Clean-up: consumer.hpp: coding style indentation fix
[lttng-tools.git] / tests / unit / test_action.cpp
index 7d0727eda237894bb3fa2b66e9b035548b179258..52f6d26ca66a70799db00cd135d90478d9b3a52a 100644 (file)
@@ -9,6 +9,7 @@
  *
  */
 
+#include <common/error.hpp>
 #include <common/payload-view.hpp>
 #include <common/payload.hpp>
 
@@ -541,7 +542,7 @@ static void test_action_snapshot_session()
        lttng_payload_reset(&payload);
 }
 
-int main()
+static int _main()
 {
        plan_tests(NUM_TESTS);
        test_action_notify();
@@ -552,3 +553,13 @@ int main()
        test_action_snapshot_session();
        return exit_status();
 }
+
+int main()
+{
+       try {
+               return _main();
+       } catch (const std::exception& e) {
+               ERR_FMT("Unhandled exception caught by action unit test: {}", e.what());
+               abort();
+       }
+}
This page took 0.024167 seconds and 4 git commands to generate.