com.bestcode.mathparser
Class ParserException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.bestcode.mathparser.ParserException
All Implemented Interfaces:
java.io.Serializable

public class ParserException
extends java.lang.Exception

ParserException is thrown by some methods of IMathParser interface if an expression cannot be parsed. These methods are: parse(), evaluate(), getValue()

See Also:
Serialized Form

Method Summary
 java.lang.String getInvalidPortionOfExpression()
          Returns the expression string that cannot be parsed.
 java.lang.String getSubExpression()
          Returns the subexpression that is the immediate parent of the error portion.
For example, if the expression is 3+LN(MAX(4,)) then getInvalidPortionOfExpression() would return MAX(4,) and getSubExpression() would return LN(MAX(4,))

The returned sub expressions may not exactly match the original string supplied as the expression since space characters and paranthesis may be substituted for efficient parsing.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInvalidPortionOfExpression

public java.lang.String getInvalidPortionOfExpression()
Returns the expression string that cannot be parsed.


getSubExpression

public java.lang.String getSubExpression()
Returns the subexpression that is the immediate parent of the error portion.
For example, if the expression is 3+LN(MAX(4,)) then getInvalidPortionOfExpression() would return MAX(4,) and getSubExpression() would return LN(MAX(4,))

The returned sub expressions may not exactly match the original string supplied as the expression since space characters and paranthesis may be substituted for efficient parsing.