org.apache.geode.security.templates

## Class XmlErrorHandler

- java.lang.Object
- - org.apache.geode.security.templates.XmlErrorHandler

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

      public class XmlErrorHandler
      extends java.lang.Object
      implements org.xml.sax.ErrorHandler

  Implementation of `ErrorHandler` interface to handle validation errors while XML parsing. This throws back exceptions raised for `error` and `fatalError` cases while a `LogWriter.warning(String)` level logging is done for the `warning` case.
  Since:
    GemFire 5.5

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XmlErrorHandler(LogWriter systemLogWriter, java.lang.String xmlFileName)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `error(org.xml.sax.SAXParseException exception)` Throws back the exception with the name of the XML file and the position where the exception occurred.
    `void` | `fatalError(org.xml.sax.SAXParseException exception)` Throws back the exception with the name of the XML file and the position where the exception occurred.
    `void` | `warning(org.xml.sax.SAXParseException exception)` Log the exception at `LogWriter.warning(String)` level with XML filename and the position of exception in the file.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XmlErrorHandler

          public XmlErrorHandler(LogWriter systemLogWriter,
                                 java.lang.String xmlFileName)

  - ### Method Detail

    - #### error

          public void error(org.xml.sax.SAXParseException exception)
                     throws org.xml.sax.SAXException

      Throws back the exception with the name of the XML file and the position where the exception occurred.
      Specified by:
        `error` in interface `org.xml.sax.ErrorHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### fatalError

          public void fatalError(org.xml.sax.SAXParseException exception)
                          throws org.xml.sax.SAXException

      Throws back the exception with the name of the XML file and the position where the exception occurred.
      Specified by:
        `fatalError` in interface `org.xml.sax.ErrorHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### warning

          public void warning(org.xml.sax.SAXParseException exception)
                       throws org.xml.sax.SAXException

      Log the exception at `LogWriter.warning(String)` level with XML filename and the position of exception in the file.
      Specified by:
        `warning` in interface `org.xml.sax.ErrorHandler`
      Throws:
        `org.xml.sax.SAXException`