Class DroolsParserExceptionFactory


  • public class DroolsParserExceptionFactory
    extends java.lang.Object
    Helper class that generates DroolsParserException with user friendly error messages.
    See Also:
    DroolsParserException
    • Field Detail

      • MISMATCHED_TOKEN_MESSAGE_COMPLETE

        public static final java.lang.String MISMATCHED_TOKEN_MESSAGE_COMPLETE
        See Also:
        Constant Field Values
      • MISMATCHED_TOKEN_MESSAGE_PART

        public static final java.lang.String MISMATCHED_TOKEN_MESSAGE_PART
        See Also:
        Constant Field Values
      • MISMATCHED_TREE_NODE_MESSAGE_COMPLETE

        public static final java.lang.String MISMATCHED_TREE_NODE_MESSAGE_COMPLETE
        See Also:
        Constant Field Values
      • MISMATCHED_TREE_NODE_MESSAGE_PART

        public static final java.lang.String MISMATCHED_TREE_NODE_MESSAGE_PART
        See Also:
        Constant Field Values
      • NO_VIABLE_ALT_MESSAGE

        public static final java.lang.String NO_VIABLE_ALT_MESSAGE
        See Also:
        Constant Field Values
      • EARLY_EXIT_MESSAGE

        public static final java.lang.String EARLY_EXIT_MESSAGE
        See Also:
        Constant Field Values
      • MISMATCHED_SET_MESSAGE

        public static final java.lang.String MISMATCHED_SET_MESSAGE
        See Also:
        Constant Field Values
      • MISMATCHED_NOT_SET_MESSAGE

        public static final java.lang.String MISMATCHED_NOT_SET_MESSAGE
        See Also:
        Constant Field Values
      • FAILED_PREDICATE_MESSAGE

        public static final java.lang.String FAILED_PREDICATE_MESSAGE
        See Also:
        Constant Field Values
      • TRAILING_SEMI_COLON_NOT_ALLOWED_MESSAGE

        public static final java.lang.String TRAILING_SEMI_COLON_NOT_ALLOWED_MESSAGE
        See Also:
        Constant Field Values
      • PARSER_LOCATION_MESSAGE_COMPLETE

        public static final java.lang.String PARSER_LOCATION_MESSAGE_COMPLETE
        See Also:
        Constant Field Values
      • PARSER_LOCATION_MESSAGE_PART

        public static final java.lang.String PARSER_LOCATION_MESSAGE_PART
        See Also:
        Constant Field Values
      • UNEXPECTED_EXCEPTION

        public static final java.lang.String UNEXPECTED_EXCEPTION
        See Also:
        Constant Field Values
    • Constructor Detail

      • DroolsParserExceptionFactory

        public DroolsParserExceptionFactory​(java.util.Collection<java.util.Map<DroolsParaphraseTypes,​java.lang.String>> paraphrases,
                                            org.kie.internal.builder.conf.LanguageLevelOption languageLevel)
        DroolsParserErrorMessages constructor.
        Parameters:
        tokenNames - tokenNames generated by ANTLR
        paraphrases - 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 number
        column - column position
        offset - 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​(java.lang.Exception e,
                                                           org.antlr.runtime.Token token)