public final class ConversionFailedException extends ConversionException
Constructor and Description |
---|
ConversionFailedException(TypeDescriptor sourceType,
TypeDescriptor targetType,
Object value,
Throwable cause)
Create a new conversion exception.
|
Modifier and Type | Method and Description |
---|---|
TypeDescriptor |
getSourceType()
Return the source type we tried to convert the value from.
|
TypeDescriptor |
getTargetType()
Return the target type we tried to convert the value to.
|
Object |
getValue()
Return the offending value.
|
contains, getMessage, getMostSpecificCause, getRootCause
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ConversionFailedException(TypeDescriptor sourceType, TypeDescriptor targetType, Object value, Throwable cause)
sourceType
- the value's original typetargetType
- the value's target typevalue
- the value we tried to convertcause
- the cause of the conversion failurepublic TypeDescriptor getSourceType()
public TypeDescriptor getTargetType()
public Object getValue()