Class ConversionFailedException

All Implemented Interfaces:
Serializable

public 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:
  • Constructor Details

    • ConversionFailedException

      public 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

    • getSourceType

      @Nullable 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

      @Nullable public Object getValue()
      Return the offending value.