X-Git-Url: http://git.liburcu.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fstop.cpp;fp=src%2Fbin%2Flttng%2Fcommands%2Fstop.cpp;h=9d5533a2175c361be78f159a56628517afed9c13;hp=af42d98db1f291f12d615976b29d3646cd573316;hb=e8c353ad12851366573d9bfe45d333a9e9ff742d;hpb=bb1c9fc3f89c2faffb0228c0b77e32653e018a23 diff --git a/src/bin/lttng/commands/stop.cpp b/src/bin/lttng/commands/stop.cpp index af42d98db..9d5533a21 100644 --- a/src/bin/lttng/commands/stop.cpp +++ b/src/bin/lttng/commands/stop.cpp @@ -7,6 +7,7 @@ #define _LGPL_SOURCE #include "../command.hpp" +#include "../exception.hpp" #include "../utils.hpp" #include @@ -146,6 +147,14 @@ cmd_error_code stop_tracing(const lttng::cli::session_spec& spec) lttng_strerror(-ctl_exception.code())); listing_failed = true; return {}; + } catch (const lttng::cli::no_default_session_error& cli_exception) { + /* + * The retrieval of the default session name already logs + * an error when it fails. There is no value in printing + * anything about this exception. + */ + listing_failed = true; + return {}; } }();