00001 #ifndef BOERN_CONFIG_SAX2_ERROR_HANDLER_HPP
00002 #define BOERN_CONFIG_SAX2_ERROR_HANDLER_HPP
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #include <xercesc/sax/ErrorHandler.hpp>
00021 #include <xercesc/sax/SAXParseException.hpp>
00022 
00023 #include <string>
00024 
00025 namespace psfa 
00026 {
00027 
00034   class ConfigSax2ErrorHandler : public xercesc::ErrorHandler 
00035   {
00036   public:
00037 
00038     ConfigSax2ErrorHandler();
00039     
00040     virtual void 
00041     error( const xercesc::SAXParseException& exception );
00042   
00043     virtual void 
00044     fatalError( const xercesc::SAXParseException& exception );
00045     
00046     virtual void 
00047     warning( const xercesc::SAXParseException& exception );
00048     
00049     virtual void 
00050     resetErrors();
00051     
00052   private:
00053     void
00054     addError( std::string message,
00055          const xercesc::SAXParseException& exception );
00056     
00057     std::string error_;
00058   };
00059 }
00060 
00061 #endif