|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nrl.parser.NRLError
public abstract class NRLError
An abstract error that contains line, column and character index info, as well as a status code.
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 Summary | |
---|---|
NRLError(int statusCode,
int line,
int column,
int length,
String message)
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NRLError(int statusCode, int line, int column, int length, String message)
Method Detail |
---|
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 message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |