org.springframework.core.convert
Class ConversionFailedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.core.NestedRuntimeException
                  extended by org.springframework.core.convert.ConversionException
                      extended by 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
See Also:
Serialized Form

Constructor Summary
ConversionFailedException(TypeDescriptor sourceType, TypeDescriptor targetType, Object value, Throwable cause)
          Create a new conversion exception.
 
Method Summary
 TypeDescriptor getSourceType()
          Return the source type we tried to convert the value from.
 TypeDescriptor getTargetType()
          Returns the target type we tried to convert the value to.
 
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
 
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
 

Constructor Detail

ConversionFailedException

public ConversionFailedException(TypeDescriptor sourceType,
                                 TypeDescriptor targetType,
                                 Object value,
                                 Throwable cause)
Create a new conversion exception.

Parameters:
value - the value we tried to convert
sourceType - the value's original type
targetType - the value's target type
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()
Returns the target type we tried to convert the value to.