public class DoNothingCSSParseErrorHandler extends Object implements ICSSParseErrorHandler
ICSSParseErrorHandler that does nothing. So in
case a recoverable error occurs it is silently ignored.| Constructor and Description |
|---|
DoNothingCSSParseErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
onCSSBrowserCompliantSkip(ParseException ex,
Token aFromToken,
Token aToToken)
This method is only called in browser compliant mode if a certain part of
the CSS is skipped.
|
void |
onCSSDeprecatedProperty(Token aPrefixToken,
Token aIdentifierToken)
To be called, if a deprecated old IE 6/7 property is found.
|
void |
onCSSParseError(ParseException aParseEx,
Token aLastSkippedToken)
Called upon a recoverable error.
|
void |
onCSSUnexpectedRule(Token aCurrentToken,
String sRule,
String sMsg)
Called upon an unexpected rule.
|
void |
onIllegalCharacter(char cIllegalChar)
This method is invoked, when an illegal character is encountered (in
TokenManager), and the respective rule is part of the JavaCC grammar.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitandpublic void onCSSParseError(@Nonnull ParseException aParseEx, @Nullable Token aLastSkippedToken)
ICSSParseErrorHandlerParseException.onCSSParseError in interface ICSSParseErrorHandleraParseEx - The original parse exception. May not be null.aLastSkippedToken - The token until which was skipped (incl.) May be null.public void onCSSUnexpectedRule(@Nonnull Token aCurrentToken, @Nonnull @Nonempty String sRule, @Nonnull @Nonempty String sMsg)
ICSSParseErrorHandler@import
is used in the middle of the file.onCSSUnexpectedRule in interface ICSSParseErrorHandleraCurrentToken - The token that could not be interpreted. Never null.sRule - The name of the rule. Always starts with a '@'. Neither
null nor empty.sMsg - The custom error message. Neither null nor empty.public void onCSSDeprecatedProperty(@Nonnull Token aPrefixToken, @Nonnull Token aIdentifierToken)
ICSSParseErrorHandleronCSSDeprecatedProperty in interface ICSSParseErrorHandleraPrefixToken - The prefix token found (like '$' or '*'). Never null.aIdentifierToken - The identifier token found. Never null.public void onCSSBrowserCompliantSkip(@Nullable ParseException ex, @Nonnull Token aFromToken, @Nonnull Token aToToken)
ICSSParseErrorHandleronCSSBrowserCompliantSkip in interface ICSSParseErrorHandlerex - The original ParseException that causes the parser to skip.
May be null.aFromToken - Original token that caused the error and was skipped (inclusive).
Never null.aToToken - The end token until which was skipped (exclusive). Never
null.CSSReaderSettings.setBrowserCompliantMode(boolean)public void onIllegalCharacter(char cIllegalChar)
ICSSParseErrorHandleronIllegalCharacter in interface ICSSParseErrorHandlercIllegalChar - The illegal charCopyright © 2014–2022 Philip Helger. All rights reserved.