Package org.htmlunit.cyberneko
Class HTMLConfiguration.ErrorReporter
java.lang.Object
org.htmlunit.cyberneko.HTMLConfiguration.ErrorReporter
- All Implemented Interfaces:
HTMLErrorReporter
- Enclosing class:
HTMLConfiguration
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 theComponents 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected XMLParseException
createException
(String key, Object[] args) formatMessage
(String key, Object[] args) Format message without reporting error.protected String
formatSimpleMessage
(String key, Object[] args) void
reportError
(String key, Object[] args) Reports an error.void
reportWarning
(String key, Object[] args) Reports a warning.
-
Field Details
-
errorMessages_
Error messages.
-
-
Constructor Details
-
ErrorReporter
protected ErrorReporter()
-
-
Method Details
-
formatMessage
Format message without reporting error.- Specified by:
formatMessage
in interfaceHTMLErrorReporter
- Parameters:
key
- keyargs
- args- Returns:
- string
-
reportWarning
Reports a warning.- Specified by:
reportWarning
in interfaceHTMLErrorReporter
- Parameters:
key
- keyargs
- args- Throws:
XMLParseException
-
reportError
Reports an error.- Specified by:
reportError
in interfaceHTMLErrorReporter
- Parameters:
key
- keyargs
- args- Throws:
XMLParseException
-
createException
-
formatSimpleMessage
-