Commit | Line | Data |
---|---|---|
e1b89bf0 JG |
1 | /* |
2 | * Copyright (C) 2024 Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
3 | * | |
4 | * SPDX-License-Identifier: LGPL-2.1-only | |
5 | * | |
6 | */ | |
7 | ||
8 | #ifndef LTTNG_CLI_EXCEPTION_H | |
9 | #define LTTNG_CLI_EXCEPTION_H | |
10 | ||
11 | #include <common/exception.hpp> | |
12 | ||
13 | #include <lttng/lttng-error.h> | |
14 | ||
15 | #include <stdexcept> | |
16 | #include <string> | |
17 | ||
9f4d1ef3 JG |
18 | #define LTTNG_THROW_CLI_NO_DEFAULT_SESSION() \ |
19 | throw lttng::cli::no_default_session_error( \ | |
20 | LTTNG_SOURCE_LOCATION()) | |
e1b89bf0 JG |
21 | |
22 | namespace lttng { | |
23 | namespace cli { | |
24 | class no_default_session_error : public runtime_error { | |
25 | public: | |
9f4d1ef3 | 26 | explicit no_default_session_error(const lttng::source_location& source_location); |
e1b89bf0 JG |
27 | }; |
28 | } /* namespace cli */ | |
29 | }; /* namespace lttng */ | |
30 | ||
31 | #endif /* LTTNG_CLI_EXCEPTION_H */ |