19 #ifndef CSCDQM_Exception_H 20 #define CSCDQM_Exception_H 25 #include <xercesc/sax/ErrorHandler.hpp> 26 #include <xercesc/sax/SAXParseException.hpp> 51 return message.c_str();
65 void warning(
const XERCES_CPP_NAMESPACE::SAXParseException& exc)
override {
66 char* message = XERCES_CPP_NAMESPACE::XMLString::transcode(exc.getMessage());
67 LOG_WARN <<
"File: " << message <<
". line: " << exc.getLineNumber() <<
" col: " << exc.getColumnNumber();
71 void error(
const XERCES_CPP_NAMESPACE::SAXParseException& exc)
override {
72 this->fatalError(exc);
75 void fatalError(
const XERCES_CPP_NAMESPACE::SAXParseException& exc)
override {
76 char* message = XERCES_CPP_NAMESPACE::XMLString::transcode(exc.getMessage());
77 LOG_COUT <<
"File: " << message <<
". line: " << exc.getLineNumber() <<
" col: " << exc.getColumnNumber();
Application level Exception that is used to cut-off application execution in various cases...
void warning(const XERCES_CPP_NAMESPACE::SAXParseException &exc) override
void error(const XERCES_CPP_NAMESPACE::SAXParseException &exc) override
void fatalError(const XERCES_CPP_NAMESPACE::SAXParseException &exc) override
void resetErrors() override
const char * what() const override
Exception(const std::string &message)
Takes care of errors and warnings while parsing XML files file in XML format.