- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Utils/Io/Xml/LoggingErrorHandler.h

    00001
    00002 //
    00003 // Copyright (c) 2005           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00010
    00011 #ifndef MERS_UTILS_IO_XML_LOGGINGERRORHANDLER_H
    00012 #define MERS_UTILS_IO_XML_LOGGINGERRORHANDLER_H
    00013
    00014 #include <Mers/Utils/Lang/String.h>
    00015 #include <Mers/Utils/Logging/logger.h>
    00016 #include <xercesc/sax/SAXParseException.hpp>
    00017 #include <xercesc/sax/ErrorHandler.hpp>
    00018
    00019 namespace Mers {
    00020 namespace Utils {
    00021 namespace Io {
    00022 namespace Xml {
    00023
    00024         class LoggingErrorHandler : public XERCES_CPP_NAMESPACE::ErrorHandler
    00025         {
    00026         public:
    00033                 LoggingErrorHandler( const log4cplus::Logger &logger = s_logger );
    00034
    00038                 virtual void
    00039                 warning (const XERCES_CPP_NAMESPACE::SAXParseException &exc);
    00040
    00044                 virtual void
    00045                 error (const XERCES_CPP_NAMESPACE::SAXParseException &exc);
    00046
    00050                 virtual void
    00051                 fatalError (const XERCES_CPP_NAMESPACE::SAXParseException &exc);
    00052
    00057                 virtual void resetErrors ();
    00058
    00059         protected:
    00064                 static Mers::Utils::Lang::String
    00065                         formatMessage(const XERCES_CPP_NAMESPACE::SAXParseException &exc);
    00066
    00067         private:
    00069                 log4cplus::Logger m_logger;
    00070
    00072                 static log4cplus::Logger s_logger;
    00073         };
    00074
    00075 }
    00076 }
    00077 }
    00078 }
    00079
    00080 #endif