summaryrefslogtreecommitdiffstats
path: root/Source/cmXMLParser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmXMLParser.cxx')
-rw-r--r--Source/cmXMLParser.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx
index a73fd70..391b874 100644
--- a/Source/cmXMLParser.cxx
+++ b/Source/cmXMLParser.cxx
@@ -20,6 +20,8 @@ cmXMLParser::cmXMLParser()
{
this->Parser = 0;
this->ParseError = 0;
+ this->ReportCallback = 0;
+ this->ReportCallbackData = 0;
}
//----------------------------------------------------------------------------
@@ -233,6 +235,13 @@ void cmXMLParser::ReportXmlParseError()
//----------------------------------------------------------------------------
void cmXMLParser::ReportError(int line, int, const char* msg)
{
- std::cerr << "Error parsing XML in stream at line "
- << line << ": " << msg << std::endl;
+ if(this->ReportCallback)
+ {
+ this->ReportCallback(line, msg, this->ReportCallbackData);
+ }
+ else
+ {
+ std::cerr << "Error parsing XML in stream at line "
+ << line << ": " << msg << std::endl;
+ }
}