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:
- java.io.Serializable
public final class ConversionFailedException
- extends ConversionException
Exception to be thrown when an actual type conversion attempt fails.
- Since:
- 3.0
- Author:
- Keith Donald, Juergen Hoeller
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
sourceType
private final TypeDescriptor sourceType
targetType
private final TypeDescriptor targetType
value
private final java.lang.Object value
ConversionFailedException
public ConversionFailedException(TypeDescriptor sourceType,
TypeDescriptor targetType,
java.lang.Object value,
java.lang.Throwable cause)
- Create a new conversion exception.
- Parameters:
sourceType
- the value's original typetargetType
- the value's target typevalue
- the value we tried to convertcause
- 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()
- Return the target type we tried to convert the value to.
getValue
public java.lang.Object getValue()
- Return the offending value.