Package org.opengis.feature
Class InvalidPropertyValueException
- Object
-
- Throwable
-
- Exception
-
- RuntimeException
-
- IllegalArgumentException
-
- InvalidPropertyValueException
-
- All Implemented Interfaces:
Serializable
public class InvalidPropertyValueException extends IllegalArgumentException
Thrown when anAttribute
value or aFeatureAssociation
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:- In
Attribute
: - In
FeatureAssociation
: - In
Feature
:
Exception for invalid class
Libraries may throwClassCastException
instead than thisInvalidPropertyValueException
when the given value is not an instance of the expected class (typicallyAttributeType.getValueClass()
). The reason is that libraries may rely on Java parameterized types, which throwsClassCastException
at runtime when the objects are used in an unsafe way. Libraries may also rely onClass.cast(Object)
orClass.asSubclass(Class)
standard methods, which are designed to throwClassCastException
, or may way to be consistent with all the above.- Since:
- 3.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InvalidPropertyValueException()
Creates an exception with no message.InvalidPropertyValueException(String message)
Creates an exception with the specified message.InvalidPropertyValueException(String message, Throwable cause)
Creates an exception with the specified message and cause.
-
Method Summary
-
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
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 theThrowable.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 theThrowable.getMessage()
method.cause
- the cause, saved for later retrieval by theThrowable.getCause()
method.
-
-