Package org.drools.drl.parser.lang
Class DroolsParserExceptionFactory
java.lang.Object
org.drools.drl.parser.lang.DroolsParserExceptionFactory
Helper class that generates DroolsParserException with user friendly error
messages.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDroolsParserExceptionFactory(Collection<Map<DroolsParaphraseTypes, String>> paraphrases, LanguageLevelOption languageLevel) DroolsParserErrorMessages constructor. -
Method Summary
Modifier and TypeMethodDescriptioncreateDroolsException(Exception e, org.antlr.runtime.Token token) createDroolsException(org.antlr.runtime.RecognitionException e) This method creates a DroolsParserException full of information.createTrailingSemicolonException(int line, int column, int offset) This method creates a DroolsParserException for trailing semicolon exception, full of information.
-
Field Details
-
MISMATCHED_TOKEN_MESSAGE_COMPLETE
- See Also:
-
MISMATCHED_TOKEN_MESSAGE_PART
- See Also:
-
MISMATCHED_TREE_NODE_MESSAGE_COMPLETE
- See Also:
-
MISMATCHED_TREE_NODE_MESSAGE_PART
- See Also:
-
NO_VIABLE_ALT_MESSAGE
- See Also:
-
EARLY_EXIT_MESSAGE
- See Also:
-
MISMATCHED_SET_MESSAGE
- See Also:
-
MISMATCHED_NOT_SET_MESSAGE
- See Also:
-
FAILED_PREDICATE_MESSAGE
- See Also:
-
TRAILING_SEMI_COLON_NOT_ALLOWED_MESSAGE
- See Also:
-
PARSER_LOCATION_MESSAGE_COMPLETE
- See Also:
-
PARSER_LOCATION_MESSAGE_PART
- See Also:
-
UNEXPECTED_EXCEPTION
- See Also:
-
-
Constructor Details
-
DroolsParserExceptionFactory
public DroolsParserExceptionFactory(Collection<Map<DroolsParaphraseTypes, String>> paraphrases, LanguageLevelOption languageLevel) DroolsParserErrorMessages constructor.- Parameters:
tokenNames- tokenNames generated by ANTLRparaphrases- paraphrases parser structure
-
-
Method Details
-
createTrailingSemicolonException
This method creates a DroolsParserException for trailing semicolon exception, full of information.- Parameters:
line- line numbercolumn- column positionoffset- char offset- Returns:
- DroolsParserException filled.
-
createDroolsException
This method creates a DroolsParserException full of information.- Parameters:
e- original exception- Returns:
- DroolsParserException filled.
-
createDroolsException
-