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];
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue