00001 // ---------------------------------------------------------------------------- 00002 // $Id: LCD_DocErrorReporter.hh,v 1.11 2004/02/03 12:45:21 uid561 Exp $ 00003 // ---------------------------------------------------------------------------- 00004 // -*-c++-*- 00005 // Error reporting for parsing of LCD (xml) documents 00006 // 00007 00008 #include "xercesc/util/XMLUniDefs.hpp" 00009 #include "xercesc/sax/ErrorHandler.hpp" 00010 00011 class LCD_DocErrorReporter : public XERCES_CPP_NAMESPACE::ErrorHandler 00012 { 00013 private: 00014 int nWarning; 00015 int nError; 00016 int nFatal; 00017 00018 public: 00019 // Constructors and Destructor 00020 LCD_DocErrorReporter() 00021 { 00022 resetErrors(); 00023 } 00024 00025 ~LCD_DocErrorReporter() 00026 { 00027 } 00028 00029 00030 // Implementation of the error handler interface 00031 void warning(const XERCES_CPP_NAMESPACE::SAXParseException& toCatch); 00032 void error(const XERCES_CPP_NAMESPACE::SAXParseException& toCatch); 00033 void fatalError(const XERCES_CPP_NAMESPACE::SAXParseException& toCatch); 00034 void resetErrors(); 00035 00036 // "get" methods 00037 int getWarningCount() {return nWarning;} 00038 int getErrorCount() {return nError;} 00039 int getFatalCount() {return nFatal;} 00040 };
1.3.4