Interface SheetErrorHandler

All Superinterfaces:
SACErrorHandler
All Known Implementing Classes:
DefaultSheetErrorHandler

public interface SheetErrorHandler extends SACErrorHandler
Handle CSS errors at the style sheet level.
  • Method Details

    • badAtRule

      void badAtRule(DOMException e, String atRule)
      A fatal problem was found parsing an at-rule.
      Parameters:
      e - the exception explaining the problem.
      atRule - the text containing the at-rule.
    • badMediaList

      void badMediaList(MediaQueryList media)
      Found a media-related rule with a wrong media list.
      Parameters:
      media - the media list.
    • emptyStyleRule

      void emptyStyleRule(String selector)
      Notify this handler that an empty style rule (a style rule without property value declarations) was found.
      Parameters:
      selector - the selector for the empty rule.
    • ignoredImport

      void ignoredImport(String uri)
      Notify this handler that an import rule was ignored for the given uri.

      Imports can be ignored if they happen at the wrong place.

      Parameters:
      uri - the uri for the ignored rule.
    • inlineStyleError

      void inlineStyleError(DOMException e, Element elm, String attr)
      Report an error processing an inline style.

      In HTML, it means that the style declration within the style attribute could not be parsed.

      Parameters:
      e - the exception found.
      elm - the element whose inline style was parsed.
      attr - the contents of the attribute containing the inline style (generally style).
    • ruleParseError

      void ruleParseError(CSSRule rule, CSSParseException ex)
      An error was found when parsing a rule.
      Parameters:
      rule - the rule.
      ex - the exception.
    • ruleParseWarning

      void ruleParseWarning(CSSRule rule, CSSParseException ex)
      A warning was produced when parsing a rule.
      Parameters:
      rule - the rule.
      ex - the exception.
    • fontFormatError

      void fontFormatError(CSSFontFaceRule rule, Exception exception)
      Found a font format error when loading a font-face rule.
      Parameters:
      rule - the font-face rule.
      exception - the exception describing the error.
    • unknownRule

      void unknownRule(String rule)
      Notify this handler that a rule of unknown type was found.
      Parameters:
      rule - the unknown rule.
    • sacMalfunction

      void sacMalfunction(String message)
      the NSAC parser is malfunctioning. Implementations may just ignore this method.

      It may be called if a property was received for being processed outside of a rule.

      Parameters:
      message - the message.
    • hasOMErrors

      boolean hasOMErrors()
      Check whether this object has handled higher-level object model errors.
      Returns:
      true if this object has handled higher-level object model errors.
    • hasOMWarnings

      boolean hasOMWarnings()
      Check whether this object has handled higher-level object model warnings.
      Returns:
      true if this object has handled higher-level object model warnings.
    • mergeState

      void mergeState(SheetErrorHandler other)
      Merge the error state from the error handler of another sheet.

      Implementations are only required to merge boolean state of NSAC errors and warnings. Merging other state is optional.

      Parameters:
      other - the other style sheet error handler.
    • reset

      void reset()
      Reset the error handler, getting it ready for a new run.