Class CmsXmlErrorHandler

  • All Implemented Interfaces:
    org.xml.sax.ErrorHandler

    public class CmsXmlErrorHandler
    extends java.lang.Object
    implements org.xml.sax.ErrorHandler
    Error hander for writing errors found during XML validation to the OpenCms log.

    Exceptions caused by warnings are suppressed (but written to the log if level is set to WARN).

    Since:
    6.0.0
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsXmlErrorHandler()
      Creates an OpenCms XML error handler.
      CmsXmlErrorHandler​(java.lang.String resourceName)
      Creates an OpenCms XML error handler with a resource name for error logging.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void error​(org.xml.sax.SAXParseException exception)  
      void fatalError​(org.xml.sax.SAXParseException exception)  
      void warning​(org.xml.sax.SAXParseException exception)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CmsXmlErrorHandler

        public CmsXmlErrorHandler​(java.lang.String resourceName)
        Creates an OpenCms XML error handler with a resource name for error logging.

        Parameters:
        resourceName - the name (path) of the XML resource that is handled, for logging
    • Method Detail

      • error

        public void error​(org.xml.sax.SAXParseException exception)
                   throws org.xml.sax.SAXException
        Specified by:
        error in interface org.xml.sax.ErrorHandler
        Throws:
        org.xml.sax.SAXException
        See Also:
        ErrorHandler.error(org.xml.sax.SAXParseException)
      • fatalError

        public void fatalError​(org.xml.sax.SAXParseException exception)
                        throws org.xml.sax.SAXException
        Specified by:
        fatalError in interface org.xml.sax.ErrorHandler
        Throws:
        org.xml.sax.SAXException
        See Also:
        ErrorHandler.fatalError(org.xml.sax.SAXParseException)
      • warning

        public void warning​(org.xml.sax.SAXParseException exception)
        Specified by:
        warning in interface org.xml.sax.ErrorHandler
        See Also:
        ErrorHandler.warning(org.xml.sax.SAXParseException)