Class InvalidPropertyValueException

All Implemented Interfaces:
Serializable

public class InvalidPropertyValueException extends IllegalArgumentException
Thrown when an Attribute value or a FeatureAssociation does not met the constraints (other than Java class) specified by its type. This exception can be thrown by implementations that perform validity checks. Such verifications happen typically in the following methods:

Exception for invalid class

Libraries may throw ClassCastException instead of this InvalidPropertyValueException when the given value is not an instance of the expected class (typically AttributeType.getValueClass()). The reason is that libraries may rely on Java parameterized types, which throws ClassCastException at runtime when the objects are used in an unsafe way. Libraries may also rely on Class.cast(Object) or Class.asSubclass(Class) standard methods, which are designed to throw ClassCastException, or may way to be consistent with all the above.
Since:
3.1
See Also:
  • Constructor Details

    • InvalidPropertyValueException

      public InvalidPropertyValueException()
      Creates an exception with no message.
    • InvalidPropertyValueException

      public InvalidPropertyValueException(String message)
      Creates an exception with the specified message.
      Parameters:
      message - the detail message, saved for later retrieval by the Throwable.getMessage() method.
    • InvalidPropertyValueException

      public InvalidPropertyValueException(String message, Throwable cause)
      Creates an exception with the specified message and cause.
      Parameters:
      message - the detail message, saved for later retrieval by the Throwable.getMessage() method.
      cause - the cause, saved for later retrieval by the Throwable.getCause() method.