X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Ftrigger%2Futils%2Fnotification-client.cpp;fp=tests%2Fregression%2Ftools%2Ftrigger%2Futils%2Fnotification-client.cpp;h=58ac01e6cbb078d688fb811aa22991c9e3bf1a12;hp=f733821588a63995846cb709e7e903ab2ac8cf25;hb=d5ed3e6f3a8b52d7f2a3e2277873e0f1914ba515;hpb=58561706ca99e043a4687a776dc781bdf7e78e07 diff --git a/tests/regression/tools/trigger/utils/notification-client.cpp b/tests/regression/tools/trigger/utils/notification-client.cpp index f73382158..58ac01e6c 100644 --- a/tests/regression/tools/trigger/utils/notification-client.cpp +++ b/tests/regression/tools/trigger/utils/notification-client.cpp @@ -7,6 +7,8 @@ #include "utils.h" +#include + #include #include #include @@ -81,7 +83,7 @@ end: return names_match; } -int main(int argc, char **argv) +static int _main(int argc, char **argv) { int ret; int option; @@ -279,3 +281,13 @@ end: 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(); + } +}