Class ControlStringParseException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.graphbuilder.curve.ControlStringParseException
All Implemented Interfaces:
Serializable

public class ControlStringParseException extends RuntimeException

Exception thrown if the parsing of a control-string fails. A ControlStringParseException contains a description, and may contain any of the following information:

  • An index or index range of the substring that caused the problem.
  • An ExpressionParseException that was thrown by the ExpressionTree.parse(String) method.

Otherwise the index values will be -1 if they are unassigned and the ExpressionParseException will be null.

See Also:
  • Constructor Details

    • ControlStringParseException

      public ControlStringParseException(String descrip)
      Constructor with only a description.
    • ControlStringParseException

      public ControlStringParseException(String descrip, int index)
      Constructor with a description and index value. The index value is assigned to both the fromIndex and the toIndex.
    • ControlStringParseException

      public ControlStringParseException(String descrip, int fromIndex, int toIndex)
      Constructor with a description and index range.
    • ControlStringParseException

      public ControlStringParseException(String descrip, int fromIndex, int toIndex, ExpressionParseException epe)
      Constructor with a description, index range and ExpressionParseException.
  • Method Details

    • getFromIndex

      public int getFromIndex()
      Returns the index location in the control-string that marks the start of the problem or -1 if not available.
    • getToIndex

      public int getToIndex()
      Returns the index location in the control-string that marks the end of the problem or -1 if not available.
    • getDescription

      public String getDescription()
      Returns the description of the problem.
    • getExpressionParseException

      public ExpressionParseException getExpressionParseException()
      Returns an ExpressionParseException if an expression in the control-string could not be parsed correctly or null if this was not the problem.
    • toString

      public String toString()
      Returns a nicely formatted string of this exception.
      Overrides:
      toString in class Throwable