@Immutable public class ThrowingCSSParseErrorHandler extends Object implements ICSSParseErrorHandler
ICSSParseErrorHandler that throws a
ParseException. So in case a recoverable error occurs, a new
ParseException is thrown. This is the most strict implementation of
ICSSParseErrorHandler.| Constructor and Description |
|---|
ThrowingCSSParseErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
onCSSParseError(Token aLastValidToken,
int[][] aExpectedTokenSequencesVal,
String[] aTokenImageVal,
Token aLastSkippedToken)
Called upon a recoverable error.
|
void |
onCSSUnexpectedRule(Token aCurrentToken,
String sRule,
String sMsg)
Called upon an unexpected rule.
|
String |
toString() |
public void onCSSParseError(@Nonnull Token aLastValidToken, @Nonnull int[][] aExpectedTokenSequencesVal, @Nonnull String[] aTokenImageVal, @Nullable Token aLastSkippedToken) throws ParseException
ICSSParseErrorHandlerParseException.onCSSParseError in interface ICSSParseErrorHandleraLastValidToken - The last valid token. May not be null.aExpectedTokenSequencesVal - The expected token. May not be null.aTokenImageVal - The error token image. 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.Copyright © 2014–2016 Philip Helger. All rights reserved.