Package org.htmlunit.cyberneko
Class HTMLConfiguration.ErrorReporter
- java.lang.Object
-
- org.htmlunit.cyberneko.HTMLConfiguration.ErrorReporter
-
- All Implemented Interfaces:
HTMLErrorReporter
- Enclosing class:
- HTMLConfiguration
protected class HTMLConfiguration.ErrorReporter extends 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
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedErrorReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected XMLParseExceptioncreateException(String key, Object[] args)StringformatMessage(String key, Object[] args)Format message without reporting error.protected StringformatSimpleMessage(String key, Object[] args)voidreportError(String key, Object[] args)Reports an error.voidreportWarning(String key, Object[] args)Reports a warning.
-
-
-
Method Detail
-
formatMessage
public String formatMessage(String key, Object[] args)
Format message without reporting error.- Specified by:
formatMessagein interfaceHTMLErrorReporter- Parameters:
key- keyargs- args- Returns:
- string
-
reportWarning
public void reportWarning(String key, Object[] args) throws XMLParseException
Reports a warning.- Specified by:
reportWarningin interfaceHTMLErrorReporter- Parameters:
key- keyargs- args- Throws:
XMLParseException
-
reportError
public void reportError(String key, Object[] args) throws XMLParseException
Reports an error.- Specified by:
reportErrorin interfaceHTMLErrorReporter- Parameters:
key- keyargs- args- Throws:
XMLParseException
-
createException
protected XMLParseException createException(String key, Object[] args)
-
-