1 //==============================================================
3 * @file XML_Error_Handler.h
5 * @brief Error handler for Xerces
7 * @author Bala Natarajan <bala@dre.vanderbilt.edu>
9 //================================================================
10 #ifndef ACE_XML_ERROR_HANDLER_H
11 #define ACE_XML_ERROR_HANDLER_H
13 #include /**/ "ace/pre.h"
15 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 #endif /* ACE_LACKS_PRAGMA_ONCE */
19 #include "XML_Utils_Export.h"
21 #include <xercesc/sax/ErrorHandler.hpp>
26 * @class XML_Error_Hander
28 * @brief Error handler for XERCES
30 class XML_Utils_Export XML_Error_Handler
31 : public xercesc::ErrorHandler
34 XML_Error_Handler () = default;
35 ~XML_Error_Handler () override
= default;
37 void warning(const xercesc::SAXParseException
& toCatch
) override
;
38 void error(const xercesc::SAXParseException
& toCatch
) override
;
39 void fatalError(const xercesc::SAXParseException
& toCatch
) override
;
40 void resetErrors() override
;
41 bool getErrors () const;
43 XML_Error_Handler (const XML_Error_Handler
&) = delete;
44 XML_Error_Handler
& operator= (const XML_Error_Handler
&) = delete;
45 XML_Error_Handler (XML_Error_Handler
&&) = delete;
46 XML_Error_Handler
& operator= (XML_Error_Handler
&&) = delete;
48 bool errors_
{ false };
52 #include /**/ "ace/post.h"
54 #endif /* ACE_XML_ERROR_HANDLER_H */