Class NoTypeConversionAvailableException

  • All Implemented Interfaces:
    Serializable

    public class NoTypeConversionAvailableException
    extends CamelException
    An exception thrown if a value could not be converted to the required type
    See Also:
    Serialized Form
    • Constructor Detail

      • NoTypeConversionAvailableException

        public NoTypeConversionAvailableException​(Object value,
                                                  Class<?> type)
      • NoTypeConversionAvailableException

        public NoTypeConversionAvailableException​(Object value,
                                                  Class<?> type,
                                                  Throwable cause)
    • Method Detail

      • getValue

        public Object getValue()
        Returns the value which could not be converted
      • getToType

        public Class<?> getToType()
        Returns the required to type
      • getFromType

        public Class<?> getFromType()
        Returns the required from type. Returns null if the provided value was null.
      • createMessage

        public static String createMessage​(Object value,
                                           Class<?> type)
        Returns an error message for no type converter available.
      • createMessage

        public static String createMessage​(Object value,
                                           Class<?> type,
                                           Throwable cause)
        Returns an error message for no type converter available with the cause.