sessiond: Split ust_registry_session into per-type classes
[lttng-tools.git] / src / common / exception.hpp
index 20731c06aa4419f18daac0c2ff5a0622990cb559..b223799151508c5a5a51d37628db093aca9bc6d6 100644 (file)
@@ -18,6 +18,8 @@
        throw lttng::ctl::error(msg, error_code, __FILE__, __func__, __LINE__)
 #define LTTNG_THROW_POSIX(msg, errno_code) \
        throw lttng::posix_error(msg, errno_code, __FILE__, __func__, __LINE__)
+#define LTTNG_THROW_ERROR(msg) \
+       throw lttng::runtime_error(msg, __FILE__, __func__, __LINE__)
 
 namespace lttng {
 
@@ -45,6 +47,14 @@ public:
                unsigned int line_number);
 };
 
+class runtime_error : public std::runtime_error {
+public:
+       explicit runtime_error(const std::string &msg,
+               const char *file_name,
+               const char *function_name,
+               unsigned int line_number);
+};
+
 }; /* namespace lttng */
 
 #endif /* LTTNG_EXCEPTION_H_ */
This page took 0.024156 seconds and 4 git commands to generate.