org.springframework.core.convert
Class ConversionFailedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.core.convert.ConversionException
org.springframework.core.convert.ConversionFailedException
- All Implemented Interfaces:
- Serializable
public final class ConversionFailedException
- extends ConversionException
Thrown when an attempt to execute a type conversion fails.
- Since:
- 3.0
- Author:
- Keith Donald, Juergen Hoeller
- See Also:
- Serialized Form
ConversionFailedException
public ConversionFailedException(TypeDescriptor sourceType,
TypeDescriptor targetType,
Object value,
Throwable cause)
- Create a new conversion exception.
- Parameters:
value
- the value we tried to convertsourceType
- the value's original typetargetType
- the value's target typecause
- the cause of the conversion failure
getSourceType
public TypeDescriptor getSourceType()
- Return the source type we tried to convert the value from.
getTargetType
public TypeDescriptor getTargetType()
- Returns the target type we tried to convert the value to.