public class InvalidParameterTypeException extends IllegalStateException
ParameterValue getter methods when a value can not be casted to the
requested type. For example this exception is thrown when ParameterValue.doubleValue()
is invoked but the value is not convertible to a double.
Note: This exception is of kindIllegalStateExceptioninstead thanIllegalArgumentExceptionbecause it is not caused by a bad argument. It is rather a consequence of a zero-argument method invoked in a context where is it not allowed.
ParameterValue.intValue(),
ParameterValue.doubleValue(),
ParameterValue.booleanValue(),
ParameterValue.stringValue(),
ParameterValue.valueFile(),
Serialized FormDeparture from OGC/ISO specification:
This exception is not part of the OGC specification.
| Constructor and Description |
|---|
InvalidParameterTypeException(String message,
String parameterName)
Creates an exception with the specified message and parameter name.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getParameterName()
Returns the parameter name.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic InvalidParameterTypeException(String message, String parameterName)
message - The detail message. The detail message is saved for
later retrieval by the Throwable.getMessage() method.parameterName - The parameter name.public String getParameterName()
Copyright © 1994–2019 Open Geospatial Consortium. All rights reserved.