csheets.core.formula.compiler
Class IllegalFunctionCallException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by csheets.core.formula.compiler.FormulaCompilationException
              extended by csheets.core.formula.compiler.IllegalFunctionCallException
All Implemented Interfaces:
Serializable

public class IllegalFunctionCallException
extends FormulaCompilationException

An exception that is thrown if an function call with illegal argument count or argument types is encountered during parsing.

Author:
Einar Pehrson
See Also:
Serialized Form

Constructor Summary
IllegalFunctionCallException(Function function, FunctionParameter parameter, Expression argument)
          Creates a new function call exception.
 
Method Summary
 Expression getArgument()
          Returns the argument that failed to match.
 Function getFunction()
          Returns the function that was called.
 String getMessage()
          Returns a message describing the exception.
 FunctionParameter getParameter()
          Returns the parameter that was not matched.
 String toString()
          Returns a string representation of the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IllegalFunctionCallException

public IllegalFunctionCallException(Function function,
                                    FunctionParameter parameter,
                                    Expression argument)
Creates a new function call exception.

Parameters:
function - the function that was called
parameter - the parameter that was not matched
argument - the argument that failed to match
Method Detail

getFunction

public Function getFunction()
Returns the function that was called.

Returns:
the function that was called

getParameter

public FunctionParameter getParameter()
Returns the parameter that was not matched.

Returns:
the parameter that was not matched

getArgument

public Expression getArgument()
Returns the argument that failed to match.

Returns:
the argument that failed to match

getMessage

public String getMessage()
Returns a message describing the exception.

Overrides:
getMessage in class Throwable
Returns:
a message describing the exception

toString

public String toString()
Returns a string representation of the exception.

Overrides:
toString in class FormulaCompilationException
Returns:
a string representation of the exception