java.lang.Object java.lang.Throwable java.lang.Exception org.nlogo.api.CompilerException
public class CompilerException
Exception thrown by various methods that accept NetLogo code as input and cause that code to be compiled; indicates the code was invalid. May be inspected to discover the location and nature of the error.
Field Summary | |
---|---|
static String |
RUNTIME_ERROR_AT_COMPILE_TIME_MSG_PREFIX
|
Constructor Summary | |
---|---|
CompilerException(String message,
int startPos,
int endPos,
String fileName)
|
Method Summary | |
---|---|
int |
getEndPosition()
Returns the index of the end of the portion of the code in which the error was found. |
String |
getFileName()
|
int |
getOffset()
|
int |
getStartPosition()
Returns the index of the start of the portion of the code in which the error was found. |
void |
setOffset(int offset)
|
String |
toString()
Synonymous with getDescription() . |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String RUNTIME_ERROR_AT_COMPILE_TIME_MSG_PREFIX
Constructor Detail |
---|
public CompilerException(String message, int startPos, int endPos, String fileName)
Method Detail |
---|
public int getStartPosition()
public int getEndPosition()
public int getOffset()
public void setOffset(int offset)
public String getFileName()
public String toString()
getDescription()
.
toString
in class Throwable