public interface ICSSParseErrorHandler
ParseException is thrown!| Modifier and Type | Method and Description |
|---|---|
default ICSSParseErrorHandler |
and(ICSSParseErrorHandler aOther)
Create a new
ICSSParseErrorHandler that invokes both
this and the other error handler in a serial way. |
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.
|
default 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.
|
void onCSSParseError(@Nonnull ParseException aParseEx, @Nullable Token aLastSkippedToken) throws ParseException
ParseException.aParseEx - 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.void onCSSUnexpectedRule(@Nonnull Token aCurrentToken, @Nonnull @Nonempty String sRule, @Nonnull @Nonempty String sMsg) throws ParseException
@import
is used in the middle of the file.aCurrentToken - 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.void onCSSBrowserCompliantSkip(@Nullable ParseException ex, @Nonnull Token aFromToken, @Nonnull Token aToToken) throws ParseException
ex - 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)default void onIllegalCharacter(char cIllegalChar)
cIllegalChar - The illegal char@Nonnull default ICSSParseErrorHandler and(@Nonnull ICSSParseErrorHandler aOther)
ICSSParseErrorHandler that invokes both
this and the other error handler in a serial way.aOther - The other handler to also be invoked.null.Copyright © 2014–2018 Philip Helger. All rights reserved.