- 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 TypeMethodDescriptionvoidcompatWarning(String propertyName, String cssText) A warning due to the processing of IE-compatible values was issued.booleanHave errors been reported to this error handler?booleanHave value warnings been reported to this error handler?voidmalformedURIValue(String uri) An URI CSS value contained a malformed URI.voidmissingRequiredProperty(String propertyName) A required property was missing when processing a shorthand.voidnoContainingBlock(String containedNode, Node ownerNode) Unable to find containing block forcontainedNode.voidreset()Reset this handler and prepare it to handle a new declaration.voidsacError(CSSParseException exception, int previousIndex) Reports a SAC error as per the SAC ErrorHandler.voidsacFatalError(CSSParseException exception, int previousIndex) Reports a SAC fatal error as per the SAC ErrorHandler.voidsacWarning(CSSParseException exception, int previousIndex) Reports a SAC warning as per the SAC ErrorHandler.voidshorthandError(String shorthandName, String message) Generic error while processing a shorthand.voidshorthandSyntaxError(String shorthandName, String message) When processing a shorthand, a syntax error was found.voidshorthandWarning(String shorthandName, String valueText) A shorthand could be processed, but was found to be browser-unsafe.voidsyntaxWarning(String message) A syntax issue was found, but not serious enough to trigger an error.voidunassignedShorthandValue(String shorthandName, String valueCss) When processing a shorthand, an individual value could not be properly assigned to any subproperty.voidunassignedShorthandValues(String shorthandName, String[] unassignedProperties, LexicalUnit[] unassignedValues) When processing a shorthand, some values could not be assigned.voidunknownIdentifier(String propertyName, String ident) An unrecognized CSS identifier value was found for propertypropertyName.voidwrongSubpropertyCount(String shorthandName, int count) The number of subproperty values found in a shorthand is wrong.voidwrongValue(String propertyName, CSSPropertyValueException e) The propertypropertyNamehas 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 propertypropertyNamehas 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.
-
sacFatalError
Reports a SAC fatal 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:
trueif errors were reported,falseotherwise.
-
hasWarnings
boolean hasWarnings()Have value warnings been reported to this error handler?- Returns:
trueif value warnings were reported,falseotherwise.
-
reset
void reset()Reset this handler and prepare it to handle a new declaration.
-