Package org.kuali.rice.krms.api.engine
Class IncompatibleTypeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.kuali.rice.core.api.exception.RiceRuntimeException
org.kuali.rice.krms.api.engine.IncompatibleTypeException
- All Implemented Interfaces:
Serializable
public class IncompatibleTypeException
extends org.kuali.rice.core.api.exception.RiceRuntimeException
An exception which indicates that the type of data being evaluated in the
engine does not match the expected type.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIncompatibleTypeException(Exception ex, Object value, Class<?>... validTypes) IncompatibleTypeException(Exception ex, String additionalMessage, Object value, Class<?>... validTypes) IncompatibleTypeException(Object value, Class<?>... validTypes) Constructs an IncompatibleTypeException with a reference to the object being checked and an array of valid Class objects which the type failed to match.IncompatibleTypeException(String additionalMessage, Object value, Class<?>... validTypes) Constructs an IncompatibleTypeException with a message, a reference to the object being checked, and an array of valid Class objects which the type failed to match. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IncompatibleTypeException
Constructs an IncompatibleTypeException with a reference to the object being checked and an array of valid Class objects which the type failed to match.A message describing the nature of the incompatible types will automatically be generated and can be retrieved through
Throwable.getMessage()- Parameters:
value- the object which was being evaluated against a set of valid typesvalidTypes- the valid types against which the value was being evaluated but failed to be compatible with
-
IncompatibleTypeException
-
IncompatibleTypeException
Constructs an IncompatibleTypeException with a message, a reference to the object being checked, and an array of valid Class objects which the type failed to match.The additional message will be prepended to the front of an automatically generated message describing the nature of the incompatible types and can be retrieved through
Throwable.getMessage().- Parameters:
additionalMessage- the additional message to prepend to the generated exception detail messagevalue- the object which was being evaluated against a set of valid typesvalidTypes- the valid types against which the value was being evaluated but failed to be compatible with
-
IncompatibleTypeException
-
-
Method Details
-
getValue
Returns the object which triggered the incompatible type exception.- Returns:
- the value passed to this exception upon construction
-
getValidTypes
Returns the array of Class objects which include the types against which the object value was deemed incompatible.- Returns:
- the valid types passed to this exception upon construction
-