Class ParserException

All Implemented Interfaces:
Serializable

public class ParserException extends RuntimeException
Is thrown when any grammar error happens or any exception is thrown during parsing.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getErrorDetails

      public ParseErrorDetails getErrorDetails()
      Returns the detailed description of the error, or null if none.
    • getParseTree

      public ParseTree getParseTree()
      Returns the parse tree until the parse error happened, when parseTree() was invoked. null if absent.
      Since:
      2.3
    • setParseTree

      public void setParseTree(ParseTree parseTree)
      Since:
      2.3
    • toErrorMessage

      private static String toErrorMessage(String message, String module, ParseErrorDetails details, Location location)
    • getModuleName

      @Deprecated public String getModuleName()
      Deprecated.
      Returns the module name, or null if none.
    • getLocation

      @Deprecated public Location getLocation()
      Deprecated.
      Use getLine() and getColumn() instead.
      Returns the location of the error.
    • getLine

      public final int getLine()
      Returns the line where the error occurred.
      Since:
      3.1
    • getColumn

      public final int getColumn()
      Returns the column where the error occurred.
      Since:
      3.1