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
Exception to be thrown when an actual type conversion attempt fails.
- Since:
- 3.0
- Author:
- Keith Donald, Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionConversionFailedException(@Nullable TypeDescriptor sourceType, TypeDescriptor targetType, @Nullable Object value, Throwable cause) Create a new conversion exception.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the source type we tried to convert the value from.Return the target type we tried to convert the value to.getValue()Return the offending value.Methods inherited from class org.springframework.core.NestedRuntimeExceptioncontains, getMostSpecificCause, getRootCauseMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
ConversionFailedExceptionpublic ConversionFailedException(@Nullable TypeDescriptor sourceType, TypeDescriptor targetType, @Nullable Object value, Throwable cause) Create a new conversion exception.- Parameters:
- sourceType- the value's original type
- targetType- the value's target type
- value- the value we tried to convert
- cause- the cause of the conversion failure
 
 
- 
- 
Method Details- 
getSourceTypeReturn the source type we tried to convert the value from.
- 
getTargetTypeReturn the target type we tried to convert the value to.
- 
getValue
 
-