Package com.singularsys.jep.functions

# Class IllegalParameterException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.singularsys.jep.JepException
com.singularsys.jep.EvaluationException
com.singularsys.jep.functions.IllegalParameterException

All Implemented Interfaces:
  `Serializable`

public class IllegalParameterException extends EvaluationException
Represents an illegal parameter

Author:
  Richard Morris
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IllegalParameterException(PostfixMathCommand pfmc, int pos, Object value)`
  An exception where the expected type is not known.
  `IllegalParameterException(PostfixMathCommand pfmc, Object arg1, Object arg2)`
  An exception where two arguments are incompatible.
  `IllegalParameterException(PostfixMathCommandI pfmc, int pos, Class<?> expectedClass, Object actualObject)`
  Exception where the target type is known.
  `IllegalParameterException(PostfixMathCommandI pfmc, int pos, String expectedMsg, Object actualObject)`
  Exception where a specific message is given for the expected type

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Class<?>`
  `getActualClass()`
  `Object`
  `getActualObject()`
  `int`
  `getArgumentNumber()`
  Gets the number of the argument with the first argument being 0.
  `Class<?>`
  `getExpectedClass()`
  `String`
  `getFunctionName()`
  `String`
  `getMessage()`
  `PostfixMathCommandI`
  `getPfmc()`

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### IllegalParameterException

    public IllegalParameterException(PostfixMathCommandI pfmc, int pos, Class<?> expectedClass, Object actualObject)
    Exception where the target type is known.
    Parameters:
      `pfmc` - the object generating the exception
      `pos` - position in the argument list, 0 is the first argument
      `expectedClass` - the expected class of the argument
      `actualObject` - the actual value of the argument

  - ### IllegalParameterException

    public IllegalParameterException(PostfixMathCommandI pfmc, int pos, String expectedMsg, Object actualObject)
    Exception where a specific message is given for the expected type
    Parameters:
      `pfmc` - the object generating the exception
      `pos` - position in the argument list, 0 is the first argument
      `expectedMsg` - message to display about expected object type
      `actualObject` - the actual value of the argument
    Since:
      3.5

  - ### IllegalParameterException

    public IllegalParameterException(PostfixMathCommand pfmc, int pos, Object value)
    An exception where the expected type is not known.
    Parameters:
      `pfmc` - the object generating the exception
      `pos` - position in the argument list, 0 is the first argument
      `value` - the actual value of the argument

  - ### IllegalParameterException

    public IllegalParameterException(PostfixMathCommand pfmc, Object arg1, Object arg2)
    An exception where two arguments are incompatible.
    Parameters:
      `pfmc` - the object generating the exception
      `arg1` - first argument
      `arg2` - second argument

- ## Method Details

  - ### getMessage

    public String getMessage()
    Overrides:
      `getMessage` in class `Throwable`

  - ### getFunctionName

    public String getFunctionName()

  - ### getArgumentNumber

    public int getArgumentNumber()
    Gets the number of the argument with the first argument being 0.
    Returns:
      the position

  - ### getExpectedClass

    public Class<?> getExpectedClass()

  - ### getActualObject

    public Object getActualObject()

  - ### getActualClass

    public Class<?> getActualClass()

  - ### getPfmc

    public PostfixMathCommandI getPfmc()