CubeTwister 2.0alpha142 2012-02-11

ch.randelshofer.io
Class ParseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by ch.randelshofer.io.ParseException
All Implemented Interfaces:
java.io.Serializable

public class ParseException
extends java.io.IOException

This exception is thrown by ScriptParser, when it encounters an invalid token.

Version:
1.0 2001-02-24
Author:
Werner Randelshofer, Hausmatt 10, Immensee, CH-6405, Switzerland
See Also:
Serialized Form

Constructor Summary
ParseException(java.lang.String msg)
          Constructs a ParseException with the specified detail message.
ParseException(java.lang.String msg, int startpos, int endpos)
          Constructs a ParseException with the specified detail message.
 
Method Summary
 int getEndPosition()
          Returns the end position of the invalid token.
 int getStartPosition()
          Returns the start position of the invalid token.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParseException

public ParseException(java.lang.String msg)
Constructs a ParseException with the specified detail message. Start and end position are set to 0.

Parameters:
msg - the detail message.

ParseException

public ParseException(java.lang.String msg,
                      int startpos,
                      int endpos)
Constructs a ParseException with the specified detail message.

Parameters:
msg - the detail message.
startpos - the start position of the invalid token.
endpos - the end position of the invalid token.
Method Detail

getStartPosition

public int getStartPosition()
Returns the start position of the invalid token.


getEndPosition

public int getEndPosition()
Returns the end position of the invalid token.


(c) Werner Randelshofer.
All rights reserved.