Class HTMLConfiguration.ErrorReporter

  • All Implemented Interfaces:
    HTMLErrorReporter
    Enclosing class:
    HTMLConfiguration

    protected class HTMLConfiguration.ErrorReporter
    extends java.lang.Object
    implements HTMLErrorReporter
    Defines an error reporter for reporting HTML errors. There is no such thing as a fatal error in parsing HTML. I/O errors are fatal but should throw an IOException directly instead of reporting an error.

    When used in a configuration, the error reporter instance should be set as a property with the following property identifier:

     "http://cyberneko.org/html/internal/error-reporter" in the
     
    Components in the configuration can query the error reporter using this property identifier.

    Note: All reported errors are within the domain "http://cyberneko.org/html".

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.ResourceBundle errorMessages_
      Error messages.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ErrorReporter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected XMLParseException createException​(java.lang.String key, java.lang.Object[] args)  
      java.lang.String formatMessage​(java.lang.String key, java.lang.Object[] args)
      Format message without reporting error.
      protected java.lang.String formatSimpleMessage​(java.lang.String key, java.lang.Object[] args)  
      void reportError​(java.lang.String key, java.lang.Object[] args)
      Reports an error.
      void reportWarning​(java.lang.String key, java.lang.Object[] args)
      Reports a warning.
      • Methods inherited from class java.lang.Object

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

      • errorMessages_

        private java.util.ResourceBundle errorMessages_
        Error messages.
    • Constructor Detail

      • ErrorReporter

        protected ErrorReporter()
    • Method Detail

      • formatMessage

        public java.lang.String formatMessage​(java.lang.String key,
                                              java.lang.Object[] args)
        Format message without reporting error.
        Specified by:
        formatMessage in interface HTMLErrorReporter
        Parameters:
        key - key
        args - args
        Returns:
        string
      • createException

        protected XMLParseException createException​(java.lang.String key,
                                                    java.lang.Object[] args)
      • formatSimpleMessage

        protected java.lang.String formatSimpleMessage​(java.lang.String key,
                                                       java.lang.Object[] args)