Package io.sf.carte.doc.style.css
Interface SheetErrorHandler
- All Superinterfaces:
SACErrorHandler
- All Known Implementing Classes:
DefaultSheetErrorHandler
Handle CSS errors at the style sheet level.
-
Method Summary
Modifier and TypeMethodDescriptionvoidbadAtRule(DOMException e, String atRule) A fatal problem was found parsing an at-rule.voidbadMediaList(MediaQueryList media) Found a media-related rule with a wrong media list.voidemptyStyleRule(String selector) Notify this handler that an empty style rule (a style rule without property value declarations) was found.voidfontFormatError(CSSFontFaceRule rule, Exception exception) Found a font format error when loading a font-face rule.booleanCheck whether this object has handled higher-level object model errors.booleanCheck whether this object has handled higher-level object model warnings.voidignoredImport(String uri) Notify this handler that an import rule was ignored for the given uri.voidinlineStyleError(DOMException e, Element elm, String attr) Report an error processing an inline style.voidmergeState(SheetErrorHandler other) Merge the error state from the error handler of another sheet.voidreset()Reset the error handler, getting it ready for a new run.voidruleParseError(CSSRule rule, CSSParseException ex) An error was found when parsing a rule.voidruleParseWarning(CSSRule rule, CSSParseException ex) A warning was produced when parsing a rule.voidsacMalfunction(String message) the NSAC parser is malfunctioning.voidunknownRule(String rule) Notify this handler that a rule of unknown type was found.Methods inherited from interface io.sf.carte.doc.style.css.SACErrorHandler
handleSacError, handleSacWarning, hasSacErrors, hasSacWarnings, mapError
-
Method Details
-
badAtRule
A fatal problem was found parsing an at-rule.- Parameters:
e- the exception explaining the problem.atRule- the text containing the at-rule.
-
badMediaList
Found a media-related rule with a wrong media list.- Parameters:
media- the media list.
-
emptyStyleRule
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
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
Report an error processing an inline style.In HTML, it means that the style declration within the
styleattribute 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 (generallystyle).
-
ruleParseError
An error was found when parsing a rule.- Parameters:
rule- the rule.ex- the exception.
-
ruleParseWarning
A warning was produced when parsing a rule.- Parameters:
rule- the rule.ex- the exception.
-
fontFormatError
Found a font format error when loading a font-face rule.- Parameters:
rule- the font-face rule.exception- the exception describing the error.
-
unknownRule
Notify this handler that a rule of unknown type was found.- Parameters:
rule- the unknown rule.
-
sacMalfunction
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:
trueif this object has handled higher-level object model errors.
-
hasOMWarnings
boolean hasOMWarnings()Check whether this object has handled higher-level object model warnings.- Returns:
trueif this object has handled higher-level object model warnings.
-
mergeState
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.
-