correct logging levels (ERR causes a crash), and a minor style fix

master
Oz Linden 2014-03-14 16:19:21 -04:00
parent 06bdcef531
commit 3ee3d4a8f4
3 changed files with 15 additions and 15 deletions

View File

@ -163,15 +163,14 @@ std::string LLKeywords::getArguments(LLSD& arguments)
}
else
{
LL_INFOS("SyntaxLSL")
<< "Argument array does not comtain a map element!" << LL_ENDL;
LL_WARNS("SyntaxLSL")
<< "Argument array comtains a non-map element!" << LL_ENDL;
}
}
}
else if (!arguments.isUndefined())
{
LL_WARNS("SyntaxLSL")
<< "Not an array! Invalid arguments LLSD passed to function." << arguments << LL_ENDL;
LL_WARNS("SyntaxLSL") << "Not an array! Invalid arguments LLSD passed to function." << arguments << LL_ENDL;
}
return argString == "" ? "" : argString;
}
@ -251,7 +250,7 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in)
}
else
{
LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognised!" << LL_ENDL;
LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognized!" << LL_ENDL;
}
return LLUIColorTable::instance().getColor(ColourGroup);
@ -287,7 +286,7 @@ void LLKeywords::processTokens()
}
else
{
LL_ERRS("LSL-Tokens-Processing") << "Map for " + outerIt->first + " entries is missing! Ignoring." << LL_ENDL;
LL_WARNS("LSL-Tokens-Processing") << "Map for " + outerIt->first + " entries is missing! Ignoring." << LL_ENDL;
}
}
}
@ -356,7 +355,7 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group)
}
else
{
LL_ERRS("SyntaxLSL") << "Not a valid attribute" << LL_ENDL;
LL_WARNS("SyntaxLSL") << "Not a valid attribute" << LL_ENDL;
}
}
@ -403,7 +402,7 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group)
}
else if (Tokens.isArray()) // Currently nothing should need this, but it's here for completeness
{
LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here" << LL_ENDL;
LL_WARNS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << Color << LL_ENDL;
for (int count = 0; count < Tokens.size(); ++count)
{
addToken(token_type, Tokens[count], Color, "");
@ -411,7 +410,7 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group)
}
else
{
LL_INFOS("Tokens") << "Invalid map/array passed: '" << Tokens << "'" << LL_ENDL;
LL_WARNS("Tokens") << "Invalid map/array passed: '" << Tokens << "'" << LL_ENDL;
}
}

View File

@ -571,7 +571,8 @@ void LLTextBase::drawText()
if ( (getSpellCheck()) && (getWText().length() > 2) )
{
// Calculate start and end indices for the spell checking range
S32 start = line_start, end = getLineEnd(last_line);
S32 start = line_start;
S32 end = getLineEnd(last_line);
if ( (mSpellCheckStart != start) || (mSpellCheckEnd != end) )
{

View File

@ -50,7 +50,7 @@ void fetchKeywordsFileResponder::errorWithContent(U32 status,
const LLSD& content)
{
LLSyntaxIdLSL::sLoadFailed = true;
LL_ERRS("SyntaxLSL")
LL_WARNS("SyntaxLSL")
<< "fetchKeywordsFileResponder error [status:"
<< status << "]: " << content
<< LL_ENDL;
@ -88,7 +88,7 @@ void fetchKeywordsFileResponder::result(const LLSD& content_ref)
{
LLSyntaxIdLSL::sLoaded = false;
LLSyntaxIdLSL::sLoadFailed = true;
LL_ERRS("SyntaxLSL")
LL_WARNS("SyntaxLSL")
<< "Syntax file '" << mFileSpec << "' contains invalid LLSD!" << LL_ENDL;
}
@ -174,7 +174,7 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged()
if (!region->capabilitiesReceived())
{ // Shouldn't be possible, but experience shows that it may be needed.
sLoadFailed = true;
LL_ERRS("SyntaxLSL")
LL_WARNS("SyntaxLSL")
<< "Region '" << region->getName()
<< "' has not received capabilities yet! Cannot process SyntaxId."
<< LL_ENDL;
@ -304,7 +304,7 @@ void LLSyntaxIdLSL::initialise()
else
{
sLoadFailed = true;
LL_ERRS("SyntaxLSL")
LL_WARNS("SyntaxLSL")
<< "LSLSyntaxId capability URL is empty!!" << LL_ENDL;
loadDefaultKeywordsIntoLLSD();
}
@ -388,7 +388,7 @@ void LLSyntaxIdLSL::loadKeywordsIntoLLSD()
sLoaded = (bool)LLSDSerialize::fromXML(content, file);
if (!sLoaded)
{
LL_ERRS("SyntaxLSL")
LL_WARNS("SyntaxLSL")
<< "Unable to deserialise file: "
<< mFullFileSpec << LL_ENDL;
}