combine lastError

This commit is contained in:
john30
2015-10-18 12:07:52 +02:00
parent 345a700386
commit d7f54f97f4
+6
View File
@@ -172,9 +172,15 @@ public:
ifs.close(); ifs.close();
ostringstream error; ostringstream error;
error << filename << ":" << static_cast<unsigned>(lineNo); error << filename << ":" << static_cast<unsigned>(lineNo);
if (m_lastError.length()>0) {
error << ": " << m_lastError;
}
m_lastError = error.str(); m_lastError = error.str();
return result; return result;
} }
if (m_lastError.length()>0) {
cout << m_lastError << endl;
}
printErrorPos(cout, row.begin(), end, it, filename, lineNo, result); printErrorPos(cout, row.begin(), end, it, filename, lineNo, result);
} else if (!verbose) } else if (!verbose)
m_lastError = ""; m_lastError = "";