From 682aae3196e2e5610a7e23725e967de478ca2b7d Mon Sep 17 00:00:00 2001 From: Reijo Tomperi Date: Thu, 3 Nov 2011 22:43:13 +0200 Subject: [PATCH] Improve internal error print out, print line number with the error message. --- lib/token.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/token.cpp b/lib/token.cpp index f43d03c52..d36f4acdf 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -455,6 +455,10 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid) } else { // %varid% if (varid == 0) { std::list locationList; + ErrorLogger::ErrorMessage::FileLocation loc; + loc.line = tok->linenr(); + loc.setfile(""); + locationList.push_back(loc); const ErrorLogger::ErrorMessage errmsg(locationList, Severity::error, "Internal error. Token::Match called with varid 0.",