Interface StyleDeclarationErrorHandler

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 Details

    • malformedURIValue

      void malformedURIValue(String uri)
      An URI CSS value contained a malformed URI.
      Parameters:
      uri - the malformed uri.
    • shorthandSyntaxError

      void shorthandSyntaxError(String shorthandName, String message)
      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

      void shorthandWarning(String shorthandName, String valueText)
      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

      void shorthandError(String shorthandName, String message)
      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

      void unassignedShorthandValue(String shorthandName, String valueCss)
      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

      void wrongSubpropertyCount(String shorthandName, int count)
      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

      void unknownIdentifier(String propertyName, String ident)
      An unrecognized CSS identifier value was found for property propertyName.
      Parameters:
      propertyName - the property name.
      ident - the unrecognized identifier.
    • missingRequiredProperty

      void missingRequiredProperty(String propertyName)
      A required property was missing when processing a shorthand.
      Parameters:
      propertyName - the missing property name.
    • wrongValue

      void wrongValue(String propertyName, CSSPropertyValueException e)
      The property propertyName has a wrong value.
      Parameters:
      propertyName - the property name.
      e - the exception describing the problem.
    • syntaxWarning

      void syntaxWarning(String message)
      A syntax issue was found, but not serious enough to trigger an error.
      Parameters:
      message - a message describing the problem.
    • compatWarning

      void compatWarning(String propertyName, String cssText)
      A warning due to the processing of IE-compatible values was issued.
      Parameters:
      propertyName - the property name.
      cssText - the faulty cssText.
    • noContainingBlock

      void noContainingBlock(String containedNode, Node ownerNode)
      Unable to find containing block for containedNode.
      Parameters:
      containedNode - the contained node.
      ownerNode - the owner node.
    • sacWarning

      void sacWarning(CSSParseException exception, int previousIndex)
      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

      void sacError(CSSParseException exception, int previousIndex)
      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

      void sacFatalError(CSSParseException exception, int previousIndex)
      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:
      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.