Update the error level when logging an error

This commit is contained in:
Zane U. Ji 2013-12-16 11:53:58 +08:00
parent d7bd982545
commit 5e1ab6289e
1 changed files with 2 additions and 1 deletions

View File

@ -214,11 +214,12 @@ void MySAX2Handler::logError ( const wxString &type, wxLogLevelValues level,
type.c_str(), e.getLineNumber(), e.getColumnNumber(),
WrapXerces::toString ( e.getMessage() ).c_str(), mEOL.c_str() );
// Only save the first warning position
// Only save the first error position
if ( level > mLevel || ( level == mLevel && mErrorPosition.first == 1
&& mErrorPosition.second == 1 ) )
{
mErrorPosition.first = e.getLineNumber();
mErrorPosition.second = e.getColumnNumber();
mLevel = level;
}
}