Package org.codelibs.nekohtml
Class HTMLConfiguration.ErrorReporter
- java.lang.Object
-
- org.codelibs.nekohtml.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 anIOExceptiondirectly 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".
- Author:
- Andy Clark
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ResourceBundlefErrorMessagesError messages.protected java.util.LocalefLastLocaleLast locale.
-
Constructor Summary
Constructors Modifier Constructor Description protectedErrorReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.xerces.xni.parser.XMLParseExceptioncreateException(java.lang.String key, java.lang.Object[] args)Creates parse exception.java.lang.StringformatMessage(java.lang.String key, java.lang.Object[] args)Format message without reporting error.protected java.lang.StringformatSimpleMessage(java.lang.String key, java.lang.Object[] args)Format simple message.voidreportError(java.lang.String key, java.lang.Object[] args)Reports an error.voidreportWarning(java.lang.String key, java.lang.Object[] args)Reports a warning.
-
-
-
Method Detail
-
formatMessage
public java.lang.String formatMessage(java.lang.String key, java.lang.Object[] args)Format message without reporting error.- Specified by:
formatMessagein interfaceHTMLErrorReporter
-
reportWarning
public void reportWarning(java.lang.String key, java.lang.Object[] args)Reports a warning.- Specified by:
reportWarningin interfaceHTMLErrorReporter
-
reportError
public void reportError(java.lang.String key, java.lang.Object[] args)Reports an error.- Specified by:
reportErrorin interfaceHTMLErrorReporter
-
createException
protected org.apache.xerces.xni.parser.XMLParseException createException(java.lang.String key, java.lang.Object[] args)Creates parse exception.
-
formatSimpleMessage
protected java.lang.String formatSimpleMessage(java.lang.String key, java.lang.Object[] args)Format simple message.
-
-