Improve internal error print out, print line number with the error message.
This commit is contained in:
parent
9b8ffe7219
commit
682aae3196
|
@ -455,6 +455,10 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid)
|
||||||
} else { // %varid%
|
} else { // %varid%
|
||||||
if (varid == 0) {
|
if (varid == 0) {
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
|
||||||
|
ErrorLogger::ErrorMessage::FileLocation loc;
|
||||||
|
loc.line = tok->linenr();
|
||||||
|
loc.setfile("");
|
||||||
|
locationList.push_back(loc);
|
||||||
const ErrorLogger::ErrorMessage errmsg(locationList,
|
const ErrorLogger::ErrorMessage errmsg(locationList,
|
||||||
Severity::error,
|
Severity::error,
|
||||||
"Internal error. Token::Match called with varid 0.",
|
"Internal error. Token::Match called with varid 0.",
|
||||||
|
|
Loading…
Reference in New Issue