Package org.ec4j.core.parser
Interface ErrorHandler
public interface ErrorHandler
A handler that gets notified on
ErrorEvents by EditorConfigParser. Note that the basic
THROWING, THROW_SYNTAX_ERRORS_IGNORE_OTHERS and IGNORING implementations are available in
this class.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ErrorHandlerAnErrorHandlerthat does nothing inerror(ParseContext, ErrorEvent)static final ErrorHandlerAnErrorHandlerthat throws aParseExceptiononly for thoseParseExceptions whoseerrorEvent.getErrorType().isSyntaxError()returnstruestatic final ErrorHandlerAnErrorHandlerthat throws aParseExceptionfor everyErrorEventit gets viaerror(ParseContext, ErrorEvent) -
Method Summary
Modifier and TypeMethodDescriptionvoiderror(ParseContext context, ErrorEvent errorEvent) AErrorEventoccured.
-
Field Details
-
IGNORING
AnErrorHandlerthat does nothing inerror(ParseContext, ErrorEvent) -
THROWING
AnErrorHandlerthat throws aParseExceptionfor everyErrorEventit gets viaerror(ParseContext, ErrorEvent) -
THROW_SYNTAX_ERRORS_IGNORE_OTHERS
AnErrorHandlerthat throws aParseExceptiononly for thoseParseExceptions whoseerrorEvent.getErrorType().isSyntaxError()returnstrue
-
-
Method Details
-
error
AErrorEventoccured. Implementations may choose to throw aParseExceptionin reaction to anErrorEvent.- Parameters:
context- theParseContexterrorEvent- the error to handle- Throws:
ParseException
-