- All Known Implementing Classes:
DefaultStyleDeclarationErrorHandler
public interface StyleDeclarationErrorHandler
Handles the errors found in style declarations.
The reported errors can be logged, ignored, or used by some tool.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
compatWarning
(String propertyName, String cssText) A warning due to the processing of IE-compatible values was issued.boolean
Have errors been reported to this error handler?boolean
Have value warnings been reported to this error handler?void
malformedURIValue
(String uri) An URI CSS value contained a malformed URI.void
missingRequiredProperty
(String propertyName) A required property was missing when processing a shorthand.void
noContainingBlock
(String containedNode, Node ownerNode) Unable to find containing block forcontainedNode
.void
reset()
Reset this handler and prepare it to handle a new declaration.void
sacError
(CSSParseException exception, int previousIndex) Reports a SAC error as per the SAC ErrorHandler.void
sacWarning
(CSSParseException exception, int previousIndex) Reports a SAC warning as per the SAC ErrorHandler.void
shorthandError
(String shorthandName, String message) Generic error while processing a shorthand.void
shorthandSyntaxError
(String shorthandName, String message) When processing a shorthand, a syntax error was found.void
shorthandWarning
(String shorthandName, String valueText) A shorthand could be processed, but was found to be browser-unsafe.void
syntaxWarning
(String message) A syntax issue was found, but not serious enough to trigger an error.void
unassignedShorthandValue
(String shorthandName, String valueCss) When processing a shorthand, an individual value could not be properly assigned to any subproperty.void
unassignedShorthandValues
(String shorthandName, String[] unassignedProperties, LexicalUnit[] unassignedValues) When processing a shorthand, some values could not be assigned.void
unknownIdentifier
(String propertyName, String ident) An unrecognized CSS identifier value was found for propertypropertyName
.void
wrongSubpropertyCount
(String shorthandName, int count) The number of subproperty values found in a shorthand is wrong.void
wrongValue
(String propertyName, CSSPropertyValueException e) The propertypropertyName
has a wrong value.
-
Method Details
-
malformedURIValue
An URI CSS value contained a malformed URI.- Parameters:
uri
- the malformed uri.
-
shorthandSyntaxError
When processing a shorthand, a syntax error was found.- Parameters:
shorthandName
- the name of the shorthand property being processed.message
- a message describing the error.
-
shorthandWarning
A shorthand could be processed, but was found to be browser-unsafe.- Parameters:
shorthandName
- the name of the shorthand property.valueText
- the unsafe value text.
-
shorthandError
Generic error while processing a shorthand.- Parameters:
shorthandName
- the shorthand name.message
- error message.
-
unassignedShorthandValues
void unassignedShorthandValues(String shorthandName, String[] unassignedProperties, LexicalUnit[] unassignedValues) When processing a shorthand, some values could not be assigned.- Parameters:
shorthandName
- the name of the shorthand property being processed.unassignedProperties
- a string array with the names of the subproperties that went without an assigned value and were reset to default values.unassignedValues
- the array of unassigned lexical unit values.
-
unassignedShorthandValue
When processing a shorthand, an individual value could not be properly assigned to any subproperty.- Parameters:
shorthandName
- the name of the shorthand property being processed.valueCss
- the css text of the unassigned value.
-
wrongSubpropertyCount
The number of subproperty values found in a shorthand is wrong.- Parameters:
shorthandName
- the name of the shorthand property being processed.count
- the number of values found.
-
unknownIdentifier
An unrecognized CSS identifier value was found for propertypropertyName
.- Parameters:
propertyName
- the property name.ident
- the unrecognized identifier.
-
missingRequiredProperty
A required property was missing when processing a shorthand.- Parameters:
propertyName
- the missing property name.
-
wrongValue
The propertypropertyName
has a wrong value.- Parameters:
propertyName
- the property name.e
- the exception describing the problem.
-
syntaxWarning
A syntax issue was found, but not serious enough to trigger an error.- Parameters:
message
- a message describing the problem.
-
compatWarning
A warning due to the processing of IE-compatible values was issued.- Parameters:
propertyName
- the property name.cssText
- the faulty cssText.
-
noContainingBlock
Unable to find containing block forcontainedNode
.- Parameters:
containedNode
- the contained node.ownerNode
- the owner node.
-
sacWarning
Reports a SAC warning as per the SAC ErrorHandler.- Parameters:
exception
- the parse exception.previousIndex
- the index for the previously set property in the properties collection, or -1 if the problem occurred with the first property or before that.
-
sacError
Reports a SAC error as per the SAC ErrorHandler.- Parameters:
exception
- the parse exception.previousIndex
- the index for the previously set property in the properties collection, or -1 if the problem occurred with the first property or before that.
-
hasErrors
boolean hasErrors()Have errors been reported to this error handler?- Returns:
true
if errors were reported,false
otherwise.
-
hasWarnings
boolean hasWarnings()Have value warnings been reported to this error handler?- Returns:
true
if value warnings were reported,false
otherwise.
-
reset
void reset()Reset this handler and prepare it to handle a new declaration.
-