Refactoring error messages
This commit is contained in:
parent
8347b9b38a
commit
c9ff53fbed
|
@ -182,10 +182,10 @@ std::string Preprocessor::removeComments(const std::string &str, const std::stri
|
||||||
unsigned char ch = str[i];
|
unsigned char ch = str[i];
|
||||||
if (ch & 0x80)
|
if (ch & 0x80)
|
||||||
{
|
{
|
||||||
std::ostringstream errmsg;
|
std::ostringstream errmsg;
|
||||||
errmsg << "The code contains characters that are unhandled. "
|
errmsg << "The code contains characters that are unhandled. "
|
||||||
<< "Neither unicode nor extended ascii are supported. "
|
<< "Neither unicode nor extended ascii are supported. "
|
||||||
<< "(line=" << lineno << ", character code=" << std::hex << (int(ch) & 0xff) << ")";
|
<< "(line=" << lineno << ", character code=" << std::hex << (int(ch) & 0xff) << ")";
|
||||||
throw std::runtime_error(errmsg.str());
|
throw std::runtime_error(errmsg.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1714,9 +1714,9 @@ void Tokenizer::simplifyTemplates()
|
||||||
locationList.push_back(loc);
|
locationList.push_back(loc);
|
||||||
|
|
||||||
const ErrorLogger::ErrorMessage errmsg(locationList,
|
const ErrorLogger::ErrorMessage errmsg(locationList,
|
||||||
"error",
|
"information",
|
||||||
"Internal error: failed to instantiate template. The checking continues anyway.",
|
"Failed to instantiate template. The checking continues anyway.",
|
||||||
"internalError");
|
"templateInstantiate");
|
||||||
|
|
||||||
_errorLogger->reportErr(errmsg);
|
_errorLogger->reportErr(errmsg);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue