Refactoring error messages

This commit is contained in:
Daniel Marjamäki 2010-02-27 17:06:33 +01:00
parent 8347b9b38a
commit c9ff53fbed
2 changed files with 7 additions and 7 deletions

View File

@ -182,10 +182,10 @@ std::string Preprocessor::removeComments(const std::string &str, const std::stri
unsigned char ch = str[i];
if (ch & 0x80)
{
std::ostringstream errmsg;
errmsg << "The code contains characters that are unhandled. "
<< "Neither unicode nor extended ascii are supported. "
<< "(line=" << lineno << ", character code=" << std::hex << (int(ch) & 0xff) << ")";
std::ostringstream errmsg;
errmsg << "The code contains characters that are unhandled. "
<< "Neither unicode nor extended ascii are supported. "
<< "(line=" << lineno << ", character code=" << std::hex << (int(ch) & 0xff) << ")";
throw std::runtime_error(errmsg.str());
}

View File

@ -1714,9 +1714,9 @@ void Tokenizer::simplifyTemplates()
locationList.push_back(loc);
const ErrorLogger::ErrorMessage errmsg(locationList,
"error",
"Internal error: failed to instantiate template. The checking continues anyway.",
"internalError");
"information",
"Failed to instantiate template. The checking continues anyway.",
"templateInstantiate");
_errorLogger->reportErr(errmsg);
#endif