Class ConversionFailedException

  • All Implemented Interfaces:

    public class ConversionFailedException
    extends ConversionException
    Exception to be thrown when an actual type conversion attempt fails.
    Keith Donald, Juergen Hoeller
    See Also:
    Serialized Form
    • Constructor Detail

      • ConversionFailedException

        public ConversionFailedException(@Nullable
                                         TypeDescriptor sourceType,
                                         TypeDescriptor targetType,
                                         java.lang.Object value,
                                         java.lang.Throwable cause)
        Create a new conversion exception.
        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 Detail

      • 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.