commands/list_triggers.cpp \
commands/remove_trigger.cpp \
utils.cpp utils.hpp lttng.cpp \
- uprobe.cpp uprobe.hpp \
- exception.hpp exception.cpp
+ uprobe.cpp uprobe.hpp
lttng_CXXFLAGS = $(AM_CXXFLAGS) $(POPT_CFLAGS)
#define _LGPL_SOURCE
#include "../command.hpp"
-#include "../exception.hpp"
#include <common/exception.hpp>
#include <common/make-unique-wrapper.hpp>
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 {};
}
}();
#define _LGPL_SOURCE
#include "../command.hpp"
-#include "../exception.hpp"
#include "../utils.hpp"
#include <common/exception.hpp>
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 {};
}
}();
#define _LGPL_SOURCE
#include "../command.hpp"
-#include "../exception.hpp"
#include "../utils.hpp"
#include <common/exception.hpp>
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 {};
}
}();
#define _LGPL_SOURCE
#include "command.hpp"
#include "conf.hpp"
-#include "exception.hpp"
#include "utils.hpp"
#include <common/defaults.hpp>
lttng::make_unique_wrapper<char, lttng::memory::free>(
get_session_name());
- if (!configured_name) {
- LTTNG_THROW_CLI_NO_DEFAULT_SESSION();
- }
+ if (configured_name) {
+ const struct lttng::cli::session_spec new_spec(
+ lttng::cli::session_spec::type::NAME,
+ configured_name.get());
- const struct lttng::cli::session_spec new_spec(
- lttng::cli::session_spec::type::NAME, configured_name.get());
+ return list_sessions(new_spec);
+ }
- return list_sessions(new_spec);
+ return lttng::cli::session_list();
}
return get_sessions(
throw lttng::posix_error(msg, errno_code, __FILE__, __func__, __LINE__)
#define LTTNG_THROW_ERROR(msg) throw lttng::runtime_error(msg, __FILE__, __func__, __LINE__)
#define LTTNG_THROW_UNSUPPORTED_ERROR(msg) \
- throw lttng::unsupported_error(msg, __FILE__, __func__, __LINE__)
+ throw lttng::runtime_error(msg, __FILE__, __func__, __LINE__)
#define LTTNG_THROW_COMMUNICATION_ERROR(msg) \
throw lttng::communication_error(msg, __FILE__, __func__, __LINE__)
#define LTTNG_THROW_PROTOCOL_ERROR(msg) \