Exception: make source location print-out optional
[lttng-tools.git] / src / bin / lttng / exception.hpp
index 00448f92eb3ab488dc36c6e0ece267407f363e9f..3b24d2e887fadf7112533985b37d02578178ce51 100644 (file)
 #include <stdexcept>
 #include <string>
 
-#define LTTNG_THROW_CLI_NO_DEFAULT_SESSION() \
-       throw lttng::cli::no_default_session_error(__FILE__, __func__, __LINE__)
+#define LTTNG_THROW_CLI_NO_DEFAULT_SESSION()        \
+       throw lttng::cli::no_default_session_error( \
+               LTTNG_SOURCE_LOCATION())
 
 namespace lttng {
 namespace cli {
 class no_default_session_error : public runtime_error {
 public:
-       explicit no_default_session_error(const char *file_name,
-                                         const char *function_name,
-                                         unsigned int line_number);
+       explicit no_default_session_error(const lttng::source_location& source_location);
 };
 } /* namespace cli */
 }; /* namespace lttng */
This page took 0.022608 seconds and 4 git commands to generate.