org.nlogo.api
Class CompilerException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.nlogo.api.CompilerException
- All Implemented Interfaces:
- Serializable
public class CompilerException
- extends Exception
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.
- See Also:
- Serialized Form
RUNTIME_ERROR_AT_COMPILE_TIME_MSG_PREFIX
public static final String RUNTIME_ERROR_AT_COMPILE_TIME_MSG_PREFIX
- See Also:
- Constant Field Values
CompilerException
public CompilerException(String message,
int startPos,
int endPos,
String fileName)
getStartPosition
public int getStartPosition()
- Returns the index of the start of the portion of the code
in which the error was found.
getEndPosition
public int getEndPosition()
- Returns the index of the end of the portion of the code
in which the error was found.
getOffset
public int getOffset()
setOffset
public void setOffset(int offset)
getFileName
public String getFileName()
toString
public String toString()
- Synonymous with
getDescription()
.
- Overrides:
toString
in class Throwable