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:
java.io.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, java.lang.Object value)
An exception where the expected type is not known.IllegalParameterException(PostfixMathCommand pfmc, java.lang.Object arg1, java.lang.Object arg2)
An exception where two arguments are incompatible.IllegalParameterException(PostfixMathCommandI pfmc, int pos, java.lang.Class<?> expectedClass, java.lang.Object actualObject)
Exception where the target type is known.IllegalParameterException(PostfixMathCommandI pfmc, int pos, java.lang.String expectedMsg, java.lang.Object actualObject)
Exception where a specific message is given for the expected type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>
getActualClass()
java.lang.Object
getActualObject()
int
getArgumentNumber()
Gets the number of the argument with the first argument being 0.java.lang.Class<?>
getExpectedClass()
java.lang.String
getFunctionName()
java.lang.String
getMessage()
PostfixMathCommandI
getPfmc()
-
-
-
Constructor Detail
-
IllegalParameterException
public IllegalParameterException(PostfixMathCommandI pfmc, int pos, java.lang.Class<?> expectedClass, java.lang.Object actualObject)
Exception where the target type is known.- Parameters:
pfmc
- the object generating the exceptionpos
- position in the argument list, 0 is the first argumentexpectedClass
- the expected class of the argumentactualObject
- the actual value of the argument
-
IllegalParameterException
public IllegalParameterException(PostfixMathCommandI pfmc, int pos, java.lang.String expectedMsg, java.lang.Object actualObject)
Exception where a specific message is given for the expected type- Parameters:
pfmc
- the object generating the exceptionpos
- position in the argument list, 0 is the first argumentexpectedMsg
- message to display about expected object typeactualObject
- the actual value of the argument- Since:
- 3.5
-
IllegalParameterException
public IllegalParameterException(PostfixMathCommand pfmc, int pos, java.lang.Object value)
An exception where the expected type is not known.- Parameters:
pfmc
- the object generating the exceptionpos
- position in the argument list, 0 is the first argumentvalue
- the actual value of the argument
-
IllegalParameterException
public IllegalParameterException(PostfixMathCommand pfmc, java.lang.Object arg1, java.lang.Object arg2)
An exception where two arguments are incompatible.- Parameters:
pfmc
- the object generating the exceptionarg1
- first argumentarg2
- second argument
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in classjava.lang.Throwable
-
getFunctionName
public java.lang.String getFunctionName()
-
getArgumentNumber
public int getArgumentNumber()
Gets the number of the argument with the first argument being 0.- Returns:
- the position
-
getExpectedClass
public java.lang.Class<?> getExpectedClass()
-
getActualObject
public java.lang.Object getActualObject()
-
getActualClass
public java.lang.Class<?> getActualClass()
-
getPfmc
public PostfixMathCommandI getPfmc()
-
-