X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fexception.cpp;h=028d253f2d885a6c9d9c29a4dc8c875a40b698f2;hb=HEAD;hp=05c30fc6d37d198025d4c8d15433ad269bf96d16;hpb=28ab034a2c3582d07d3423d2d746731f87d3969f;p=lttng-tools.git diff --git a/src/common/exception.cpp b/src/common/exception.cpp index 05c30fc6d..028d253f2 100644 --- a/src/common/exception.cpp +++ b/src/common/exception.cpp @@ -24,12 +24,15 @@ format_throw_location(const char *file_name, const char *function_name, unsigned } } /* namespace */ -lttng::ctl::error::error(lttng_error_code error_code, +lttng::ctl::error::error(const std::string& msg, + 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(msg + ": " + std::string(error_get_str(error_code)), + file_name, + function_name, + line_number), _error_code{ error_code } { }