Class TypeConversionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.camel.RuntimeCamelException
org.apache.camel.TypeConversionException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
StreamCacheException
Unchecked exception thrown when a type converter is found but fails to convert a value to the required type.
Contrast with
NoTypeConversionAvailableException, which is thrown when no converter exists for the
source-to-target type pair at all.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTypeConversionException(@Nullable Object value, Class<?> type, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateMessage(@Nullable Object value, Class<?> type, Throwable cause) Returns an error message for type conversion failed.@Nullable Class<?> Returns the required from type.Class<?> Returns the required to type@Nullable ObjectgetValue()Returns the value which could not be convertedMethods inherited from class RuntimeCamelException
wrapRuntimeCamelException, wrapRuntimeExceptionMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TypeConversionException
-
-
Method Details
-
getValue
Returns the value which could not be converted -
getToType
Returns the required to type -
getFromType
Returns the required from type. Returns null if the provided value was null. -
createMessage
-