Class SchemaFactoryImpl.ErrorReporterWrappingErrorHandler

  • All Implemented Interfaces:
    ErrorReporter
    Enclosing class:
    SchemaFactoryImpl

    public static class SchemaFactoryImpl.ErrorReporterWrappingErrorHandler
    extends java.lang.Object
    implements ErrorReporter
    A JAXP ErrorListener that wraps a SAX ErrorHandler
    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorReporterWrappingErrorHandler​(org.xml.sax.ErrorHandler handler)
      Create an ErrorListener that wraps a supplied SAX ErrorHandler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.xml.sax.ErrorHandler getErrorHandler()
      Get the wrapped SAX ErrorHandler
      void report​(XmlProcessingError error)
      Report an error.
      • Methods inherited from class java.lang.Object

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

      • ErrorReporterWrappingErrorHandler

        public ErrorReporterWrappingErrorHandler​(org.xml.sax.ErrorHandler handler)
        Create an ErrorListener that wraps a supplied SAX ErrorHandler
        Parameters:
        handler - the SAX error handler to be wrapped
    • Method Detail

      • report

        public void report​(XmlProcessingError error)
        Description copied from interface: ErrorReporter
        Report an error. This method is called by Saxon when an error needs to be reported to the calling application.

        The application can safely ignore the error if XmlProcessingError.isWarning() returns true.

        The application can indicate to Saxon that the error should be considered fatal by calling StaticError.setFatal(String). The precise effect of marking an error as fatal is not defined, and may depend on the circumstances; in some cases it may have no effect. If a dynamic error is marked as fatal then an attempt to catch the error using a try/catch construct in XSLT or XQuery will generally be unsuccessful.

        Specified by:
        report in interface ErrorReporter
        Parameters:
        error - details of the error to be reported
      • getErrorHandler

        public org.xml.sax.ErrorHandler getErrorHandler()
        Get the wrapped SAX ErrorHandler
        Returns:
        the wrapped SAX ErrorHandler