19 #ifndef CSCDQM_Exception_H 20 #define CSCDQM_Exception_H 25 #include <xercesc/sax/ErrorHandler.hpp> 26 #include <xercesc/sax/SAXParseException.hpp> 56 void warning(
const XERCES_CPP_NAMESPACE::SAXParseException& exc)
override {
57 char* message = XERCES_CPP_NAMESPACE::XMLString::transcode(exc.getMessage());
58 LOG_WARN <<
"File: " << message <<
". line: " << exc.getLineNumber() <<
" col: " << exc.getColumnNumber();
62 void error(
const XERCES_CPP_NAMESPACE::SAXParseException& exc)
override { this->
fatalError(exc); }
64 void fatalError(
const XERCES_CPP_NAMESPACE::SAXParseException& exc)
override {
65 char* message = XERCES_CPP_NAMESPACE::XMLString::transcode(exc.getMessage());
66 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
const char * what() const override
void resetErrors() override
Exception(const std::string &message)
Takes care of errors and warnings while parsing XML files file in XML format.