NetLogo API
version 3.0.2

org.nlogo.compiler
Class CompilerException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.nlogo.compiler.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

Constructor Summary
CompilerException(String message, org.nlogo.compiler.Token token)
           
 
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
 

Constructor Detail

CompilerException

public CompilerException(String message,
                         org.nlogo.compiler.Token token)
Method Detail

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.


getFileName

public String getFileName()

getOffset

public int getOffset()

setOffset

public void setOffset(int offset)

toString

public String toString()
Synonymous with getDescription().


NetLogo API
version 3.0.2