From 5e1ab6289e6f3635cfc0f007628d3b86b70a1193 Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Mon, 16 Dec 2013 11:53:58 +0800 Subject: [PATCH] Update the error level when logging an error --- src/wrapxerces.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wrapxerces.cpp b/src/wrapxerces.cpp index 45280f1..edba26c 100644 --- a/src/wrapxerces.cpp +++ b/src/wrapxerces.cpp @@ -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; } }