return CMD_SUCCESS;
}
-cmd_error_code start_tracing(const lttng::cli::session_spec& spec) noexcept
+cmd_error_code start_tracing(const lttng::cli::session_spec& spec)
{
bool had_warning = false;
bool had_error = false;
return CMD_SUCCESS;
}
-cmd_error_code stop_tracing(const lttng::cli::session_spec& spec) noexcept
+cmd_error_code stop_tracing(const lttng::cli::session_spec& spec)
{
bool had_warning = false;
bool had_error = false;
/*
* main
*/
-int main(int argc, char *argv[])
+static int _main(int argc, char *argv[])
{
int ret;
return 0;
}
+
+int main(int argc, char **argv)
+{
+ try {
+ return _main(argc, argv);
+ } catch (const std::exception& e) {
+ ERR_FMT("Unhandled exception caught by client: %s", e.what());
+ abort();
+ }
+}
#include "utils.h"
+#include <common/error.hpp>
+
#include <lttng/action/list-internal.hpp>
#include <lttng/condition/event-rule-matches.h>
#include <lttng/lttng.h>
return names_match;
}
-int main(int argc, char **argv)
+static int _main(int argc, char **argv)
{
int ret;
int option;
free(expected_trigger_name);
return !!ret;
}
+
+int main(int argc, char **argv)
+{
+ try {
+ return _main(argc, argv);
+ } catch (const std::exception& e) {
+ ERR_FMT("Unhandled exception caught by notification client: %s", e.what());
+ abort();
+ }
+}
*
*/
+#include <common/error.hpp>
#include <common/payload-view.hpp>
#include <common/payload.hpp>
lttng_payload_reset(&payload);
}
-int main()
+static int _main()
{
plan_tests(NUM_TESTS);
test_action_notify();
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: %s", e.what());
+ abort();
+ }
+}