Class LineNumberParseException

  • All Implemented Interfaces:
    Serializable

    public class LineNumberParseException
    extends ParseException
    This exception indicates a parse error with a line and column number. The line and column number are automatically added to the exception message at construction.
    See Also:
    Serialized Form
    • Constructor Detail

      • LineNumberParseException

        public LineNumberParseException​(String message,
                                        int lineNum,
                                        int colNum)
        Constructs a new exception.
        Parameters:
        message - the error message
        lineNum - the line number (first line is 1)
        colNum - the column or character number in the line (first character is 1)
      • LineNumberParseException

        public LineNumberParseException​(String message,
                                        int lineNum,
                                        int colNum,
                                        Exception cause)
        Constructs a new exception.
        Parameters:
        message - the error message
        lineNum - the line number (first line is 1)
        colNum - the column or character number in the line (first character is 1)
        cause - a cause or null
    • Method Detail

      • getError

        public String getError()
        Returns the error message without the line and column number.
        Returns:
        the error message without the line and column number
      • getLineNum

        public int getLineNum()
        Returns the line number. The first line is 1.
        Returns:
        the line number (first line is 1)
      • getColNum

        public int getColNum()
        Returns the column or character number in the line. The first character is 1.
        Returns:
        the column or character number in the line (first character is 1)