Coverity warning: sessiond: uncaught exception in main
[lttng-tools.git] / src / bin / lttng-sessiond / main.cpp
index 8d59952d6d404b408dba3c77eb0838615790baa4..7f0995a9b0e8388bad9ed4617404825fcf5a06e0 100644 (file)
@@ -1403,7 +1403,7 @@ static void sessiond_uuid_log()
 /*
  * main
  */
-int main(int argc, char **argv)
+static int _main(int argc, char **argv)
 {
        int ret = 0, retval = 0;
        const char *env_app_timeout;
@@ -1975,3 +1975,13 @@ exit_set_signal_handler:
                exit(EXIT_FAILURE);
        }
 }
+
+int main(int argc, char **argv)
+{
+       try {
+               return _main(argc, argv);
+       } catch (const std::exception& e) {
+               ERR_FMT("Unhandled exception caught by main thread: %s", e.what());
+               abort();
+       }
+}
This page took 0.023851 seconds and 4 git commands to generate.