4#include "xmlBase/XmlErrorHandler.h"
5#include "xmlBase/Dom.h"
6#include "facilities/Util.h"
10 using XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException;
11 using XERCES_CPP_NAMESPACE_QUALIFIER XMLString;
18 char* charSyst = XMLString::transcode(toCatch.getSystemId());
19 std::string systemId(charSyst);
21 XMLString::release(&charSyst);
22 char* charMsg = XMLString::transcode(toCatch.getMessage());
23 std::string msg(charMsg);
24 XMLString::release(&charMsg);
33 std::string errMsg(
"Error at file \"");
34 errMsg += systemId +
"\", line " + line +
",column " + col;
35 errMsg +=
"\n Message: " + msg;
39 std::cerr << errMsg <<
"\n\n";
47 char* charMsg = XMLString::transcode(toCatch.getMessage());
48 std::string msg(charMsg);
49 XMLString::release(&charMsg);
53 if (!(toCatch.getSystemId()) ) {
54 std::string errMsg(
"Fatal XML parse error: no such file \n Message: ");
59 std::cerr << errMsg <<
"\n\n";
63 char* charSyst = XMLString::transcode(toCatch.getSystemId());
64 std::string systemId(charSyst);
65 XMLString::release(&charSyst);
71 std::string errMsg(
"Fatal error at file \"");
72 errMsg += systemId +
"\", line " + line +
",column " + col;
73 errMsg +=
"\n Message: " + msg;
78 std::cerr << errMsg <<
"\n\n";
83 m_nWarning = m_nError = m_nFatal = 0;
static const char * itoa(int val, std::string &outStr)
Exception class for XmlParser, XmlErrorHandler.
void warning(const SAXParseException &exception)
Keep count of warnings seen.
void resetErrors()
Clear counters.
void fatalError(const SAXParseException &exception)
Output row, column of fatal parse error and increment counter.
void error(const SAXParseException &exception)
Output row, column of parse error and increment counter.