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 |
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) throws ParseException
ICSSParseErrorHandlerParseException.onCSSParseError in interface ICSSParseErrorHandleraParseEx - The original parse exception. May not be null.aLastSkippedToken - The token until which was skipped (incl.) May be null.ParseException - In case the error is fatal and should be propagated.public void onCSSUnexpectedRule(@Nonnull Token aCurrentToken, @Nonnull @Nonempty String sRule, @Nonnull @Nonempty String sMsg) throws ParseException
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.ParseException - In case the error is fatal and should be propagated.public void onCSSBrowserCompliantSkip(@Nullable ParseException ex, @Nonnull Token aFromToken, @Nonnull Token aToToken) throws ParseException
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.ParseException - In case the error is fatal and should be propagated.CSSReaderSettings.setBrowserCompliantMode(boolean)public void onIllegalCharacter(char cIllegalChar)
ICSSParseErrorHandleronIllegalCharacter in interface ICSSParseErrorHandlercIllegalChar - The illegal charCopyright © 2014–2018 Philip Helger. All rights reserved.