Package nl.rrd.wool.exception
Class LineNumberParseException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- nl.rrd.wool.exception.ParseException
-
- nl.rrd.wool.exception.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 Summary
Constructors Constructor Description LineNumberParseException(String message, int lineNum, int colNum)Constructs a new exception.LineNumberParseException(String message, int lineNum, int colNum, Exception cause)Constructs a new exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColNum()Returns the column or character number in the line.StringgetError()Returns the error message without the line and column number.intgetLineNum()Returns the line number.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
LineNumberParseException
public LineNumberParseException(String message, int lineNum, int colNum)
Constructs a new exception.- Parameters:
message- the error messagelineNum- 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 messagelineNum- 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)
-
-