Package org.drools.drl.parser.lang
Class DroolsParserExceptionFactory
- java.lang.Object
-
- org.drools.drl.parser.lang.DroolsParserExceptionFactory
-
public class DroolsParserExceptionFactory extends Object
Helper class that generates DroolsParserException with user friendly error messages.- See Also:
DroolsParserException
-
-
Field Summary
Fields Modifier and Type Field Description static StringEARLY_EXIT_MESSAGEstatic StringFAILED_PREDICATE_MESSAGEstatic StringMISMATCHED_NOT_SET_MESSAGEstatic StringMISMATCHED_SET_MESSAGEstatic StringMISMATCHED_TOKEN_MESSAGE_COMPLETEstatic StringMISMATCHED_TOKEN_MESSAGE_PARTstatic StringMISMATCHED_TREE_NODE_MESSAGE_COMPLETEstatic StringMISMATCHED_TREE_NODE_MESSAGE_PARTstatic StringNO_VIABLE_ALT_MESSAGEstatic StringPARSER_LOCATION_MESSAGE_COMPLETEstatic StringPARSER_LOCATION_MESSAGE_PARTstatic StringTRAILING_SEMI_COLON_NOT_ALLOWED_MESSAGEstatic StringUNEXPECTED_EXCEPTION
-
Constructor Summary
Constructors Constructor Description DroolsParserExceptionFactory(Collection<Map<DroolsParaphraseTypes,String>> paraphrases, org.kie.internal.builder.conf.LanguageLevelOption languageLevel)DroolsParserErrorMessages constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DroolsParserExceptioncreateDroolsException(Exception e, org.antlr.runtime.Token token)DroolsParserExceptioncreateDroolsException(org.antlr.runtime.RecognitionException e)This method creates a DroolsParserException full of information.DroolsParserExceptioncreateTrailingSemicolonException(int line, int column, int offset)This method creates a DroolsParserException for trailing semicolon exception, full of information.
-
-
-
Field Detail
-
MISMATCHED_TOKEN_MESSAGE_COMPLETE
public static final String MISMATCHED_TOKEN_MESSAGE_COMPLETE
- See Also:
- Constant Field Values
-
MISMATCHED_TOKEN_MESSAGE_PART
public static final String MISMATCHED_TOKEN_MESSAGE_PART
- See Also:
- Constant Field Values
-
MISMATCHED_TREE_NODE_MESSAGE_COMPLETE
public static final String MISMATCHED_TREE_NODE_MESSAGE_COMPLETE
- See Also:
- Constant Field Values
-
MISMATCHED_TREE_NODE_MESSAGE_PART
public static final String MISMATCHED_TREE_NODE_MESSAGE_PART
- See Also:
- Constant Field Values
-
NO_VIABLE_ALT_MESSAGE
public static final String NO_VIABLE_ALT_MESSAGE
- See Also:
- Constant Field Values
-
EARLY_EXIT_MESSAGE
public static final String EARLY_EXIT_MESSAGE
- See Also:
- Constant Field Values
-
MISMATCHED_SET_MESSAGE
public static final String MISMATCHED_SET_MESSAGE
- See Also:
- Constant Field Values
-
MISMATCHED_NOT_SET_MESSAGE
public static final String MISMATCHED_NOT_SET_MESSAGE
- See Also:
- Constant Field Values
-
FAILED_PREDICATE_MESSAGE
public static final String FAILED_PREDICATE_MESSAGE
- See Also:
- Constant Field Values
-
TRAILING_SEMI_COLON_NOT_ALLOWED_MESSAGE
public static final String TRAILING_SEMI_COLON_NOT_ALLOWED_MESSAGE
- See Also:
- Constant Field Values
-
PARSER_LOCATION_MESSAGE_COMPLETE
public static final String PARSER_LOCATION_MESSAGE_COMPLETE
- See Also:
- Constant Field Values
-
PARSER_LOCATION_MESSAGE_PART
public static final String PARSER_LOCATION_MESSAGE_PART
- See Also:
- Constant Field Values
-
UNEXPECTED_EXCEPTION
public static final String UNEXPECTED_EXCEPTION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DroolsParserExceptionFactory
public DroolsParserExceptionFactory(Collection<Map<DroolsParaphraseTypes,String>> paraphrases, org.kie.internal.builder.conf.LanguageLevelOption languageLevel)
DroolsParserErrorMessages constructor.- Parameters:
tokenNames- tokenNames generated by ANTLRparaphrases- paraphrases parser structure
-
-
Method Detail
-
createTrailingSemicolonException
public DroolsParserException createTrailingSemicolonException(int line, int column, int offset)
This method creates a DroolsParserException for trailing semicolon exception, full of information.- Parameters:
line- line numbercolumn- column positionoffset- char offset- Returns:
- DroolsParserException filled.
-
createDroolsException
public DroolsParserException createDroolsException(org.antlr.runtime.RecognitionException e)
This method creates a DroolsParserException full of information.- Parameters:
e- original exception- Returns:
- DroolsParserException filled.
-
createDroolsException
public DroolsParserException createDroolsException(Exception e, org.antlr.runtime.Token token)
-
-