X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fexception.cpp;h=5645d7d91702efe3a0df4779d363fe616acbb78a;hb=bd02bf8b4c749cd7097b6a7364a1b7cb49cefcec;hp=241686eaf6f4687038f522ed04ccc8d6d5707239;hpb=baac5795bc71176909898f7fcbf59dc822f11f4f;p=lttng-tools.git diff --git a/src/common/exception.cpp b/src/common/exception.cpp index 241686eaf..5645d7d91 100644 --- a/src/common/exception.cpp +++ b/src/common/exception.cpp @@ -26,7 +26,8 @@ lttng::ctl::error::error(lttng_error_code error_code, const char *file_name, const char *function_name, unsigned int line_number) : - runtime_error(std::string(error_get_str(error_code)), file_name, function_name, line_number) + runtime_error(std::string(error_get_str(error_code)), file_name, function_name, line_number), + _error_code{error_code} { } @@ -49,6 +50,14 @@ lttng::runtime_error::runtime_error(const std::string& msg, { } +lttng::unsupported_error::unsupported_error(const std::string& msg, + const char *file_name, + const char *function_name, + unsigned int line_number) : + std::runtime_error(msg + " " + format_throw_location(file_name, function_name, line_number)) +{ +} + lttng::communication_error::communication_error(const std::string& msg, const char *file_name, const char *function_name,