- All Superinterfaces:
SACErrorHandler
- All Known Implementing Classes:
DefaultSheetErrorHandler
Handle CSS errors at the style sheet level.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
badAtRule
(DOMException e, String atRule) A fatal problem was found parsing an at-rule.void
badMediaList
(SACMediaList media) Found a media-related rule with a wrong media list.void
emptyStyleRule
(String selector) Notify this handler that an empty style rule (a style rule without property value declarations) was found.void
fontFormatError
(ExtendedCSSFontFaceRule rule, Exception exception) Found a font format error when loading a font-face rule.boolean
Check whether this object has handled higher-level object model errors.boolean
Check whether this object has handled higher-level object model warnings.void
ignoredImport
(String uri) Notify this handler that an import rule was ignored for the given uri.void
inlineStyleError
(DOMException e, Element elm, String attr) Report an error processing an inline style.void
mergeState
(SheetErrorHandler other) Merge the error state from the error handler of another sheet.void
reset()
Reset the error handler, getting it ready for a new run.void
ruleParseError
(CSSRule rule, CSSParseException ex) An error was found when parsing a rule.void
ruleParseWarning
(CSSRule rule, CSSParseException ex) A warning was produced when parsing a rule.void
sacMalfunction
(String message) the SAC parser is malfunctioning.void
unknownRule
(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
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 (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 SAC 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
Merge the error state from the error handler of another sheet.Implementations are only required to merge boolean state of SAC 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.
-