Use =default for skeleton copy constructor
[ACE_TAO.git] / ACE / ace / XML_Utils / XML_Error_Handler.cpp
blob931057c38ff242afbe96d993b5060f97944fe2be
1 #include "XML_Error_Handler.h"
2 #include "ace/ACE.h"
3 #include <xercesc/util/XMLString.hpp>
4 #include <xercesc/dom/DOMLocator.hpp>
5 #include <xercesc/sax/SAXParseException.hpp>
6 #include "XercesString.h"
7 #include <iostream>
9 namespace XML
11 void XML_Error_Handler::warning(const xercesc::SAXParseException& toCatch)
13 if (ACE::debug ())
15 XStr file (toCatch.getSystemId ());
16 XStr msg (toCatch.getMessage ());
18 std::cerr << "Warning: " << file << ':' << toCatch.getLineNumber ()
19 << ':' << toCatch.getColumnNumber () << " - "
20 << msg << std::endl;
24 void XML_Error_Handler::error(const xercesc::SAXParseException& toCatch)
26 if (ACE::debug ())
28 XStr file (toCatch.getSystemId ());
29 XStr msg (toCatch.getMessage ());
31 std::cerr << "Error: " << file << ':' << toCatch.getLineNumber ()
32 << ':' << toCatch.getColumnNumber () << " - "
33 << msg << std::endl;
35 this->errors_ = true;
38 void XML_Error_Handler::fatalError(const xercesc::SAXParseException& toCatch)
40 if (ACE::debug ())
42 XStr file (toCatch.getSystemId ());
43 XStr msg (toCatch.getMessage ());
45 std::cerr << "Fatal Error: " << file << ':' << toCatch.getLineNumber ()
46 << ':' << toCatch.getColumnNumber () << " - "
47 << msg << std::endl;
49 this->errors_ = true;
52 void XML_Error_Handler::resetErrors()
54 this->errors_ = false;
57 bool
58 XML_Error_Handler::getErrors () const
60 return this->errors_;