Update ssp.hpp

This commit is contained in:
ado 2023-08-06 19:44:26 +02:00
parent 9c11f22d79
commit 6b4f456654

12
ssp.hpp
View File

@ -2924,11 +2924,13 @@ private:
void decorate_rethrow(const ss::exception& e) const { void decorate_rethrow(const ss::exception& e) const {
static_assert(throw_on_error, static_assert(throw_on_error,
"throw_on_error needs to be enabled to use this method"); "throw_on_error needs to be enabled to use this method");
throw ss::exception{std::string{file_name_} auto line = reader_.line_number_;
.append(" ") throw ss::exception{
.append(std::to_string(reader_.line_number_)) std::string{file_name_}
.append(": ") .append(" ")
.append(e.what())}; .append(std::to_string(line > 1 ? line - 1 : line))
.append(": ")
.append(e.what())};
} }
//////////////// ////////////////