public abstract class NRLError extends Object
This acts as a superclass for SyntaxError and
SemanticError.
Note that lines are numbered from 1 and columns from 0. If you require a full character
offset for anything, use StringUtilities.getCharacterPosition(String, int, int).
| Constructor and Description |
|---|
NRLError(int statusCode,
int line,
int column,
int length,
String message) |
| Modifier and Type | Method and Description |
|---|---|
int |
getColumn()
Return the column where the error occurred, or -1 if not available.
|
int |
getLength()
Return the length of the input text connected to the error, or 0 if not available.
|
int |
getLine()
Return the line where the error occurred.
|
String |
getMessage()
Return the error message
|
int |
getStatusCode()
Return the status code, one of the constants in the
IStatusCode class. |
void |
setColumn(int column)
Set the column where the error occurred.
|
void |
setLength(int length)
Set the length of the error
|
void |
setLine(int line)
Set the line where the error occurred
|
void |
setMessage(String message)
Set the error message
|
public NRLError(int statusCode,
int line,
int column,
int length,
String message)
public int getColumn()
public int getLength()
public int getLine()
public String getMessage()
public int getStatusCode()
IStatusCode class.public void setColumn(int column)
column - the columnpublic void setLength(int length)
length - the lengthpublic void setLine(int line)
line - the linepublic void setMessage(String message)
message - the messageCopyright © 2006-2013. All Rights Reserved.