1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 06:45:35 +00:00

improved error reporting

This commit is contained in:
Marc Zinnschlag 2015-07-16 14:09:14 +02:00 committed by cc9cii
parent c5eec822ae
commit 3ea445cc67

View file

@ -14,7 +14,10 @@
void CSVWorld::ScriptErrorTable::report (const std::string& message, const Compiler::TokenLoc& loc, Type type) void CSVWorld::ScriptErrorTable::report (const std::string& message, const Compiler::TokenLoc& loc, Type type)
{ {
addMessage (message, type==Compiler::ErrorHandler::WarningMessage ? std::ostringstream stream;
stream << message << " (" << loc.mLiteral << ")";
addMessage (stream.str(), type==Compiler::ErrorHandler::WarningMessage ?
CSMDoc::Message::Severity_Warning : CSMDoc::Message::Severity_Error, loc.mLine); CSMDoc::Message::Severity_Warning : CSMDoc::Message::Severity_Error, loc.mLine);
} }