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