Package com.graphbuilder.curve
Class ControlStringParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.graphbuilder.curve.ControlStringParseException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionControlStringParseException(String descrip) Constructor with only a description.ControlStringParseException(String descrip, int index) Constructor with a description and index value.ControlStringParseException(String descrip, int fromIndex, int toIndex) Constructor with a description and index range.ControlStringParseException(String descrip, int fromIndex, int toIndex, ExpressionParseException epe) Constructor with a description, index range and ExpressionParseException. -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of the problem.Returns an ExpressionParseException if an expression in the control-string could not be parsed correctly or null if this was not the problem.intReturns the index location in the control-string that marks the start of the problem or -1 if not available.intReturns the index location in the control-string that marks the end of the problem or -1 if not available.toString()Returns a nicely formatted string of this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ControlStringParseException
Constructor with only a description. -
ControlStringParseException
Constructor with a description and index value. The index value is assigned to both the fromIndex and the toIndex. -
ControlStringParseException
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
Returns the description of the problem. -
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
Returns a nicely formatted string of this exception.
-