Class TypeConverterException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.helger.commons.typeconvert.TypeConverterException
All Implemented Interfaces:
Serializable

public final class TypeConverterException extends RuntimeException
Exceptions of this type are only thrown from the TypeConverter class if type conversion fails.
Author:
Philip Helger
See Also:
  • Constructor Details

    • TypeConverterException

      public TypeConverterException(@Nonnull Class<?> aDstClass, @Nonnull TypeConverterException.EReason eReason)
      Constructor only with a destination class.
      Parameters:
      aDstClass - The conversion destination class. May not be null.
      eReason - The reason code why the transformation failed. May not be null.
    • TypeConverterException

      public TypeConverterException(@Nonnull Class<?> aSrcClass, @Nonnull Class<?> aDstClass, @Nonnull TypeConverterException.EReason eReason)
      Constructor.
      Parameters:
      aSrcClass - The conversion source class. May not be null.
      aDstClass - The conversion destination class. May not be null.
      eReason - The reason code why the transformation failed. May not be null.
    • TypeConverterException

      public TypeConverterException(@Nonnull Class<?> aSrcClass, @Nonnull Class<?> aDstClass, @Nonnull TypeConverterException.EReason eReason, @Nullable Throwable aCause)
      Constructor with a cause exception.
      Parameters:
      aSrcClass - The conversion source class. May not be null.
      aDstClass - The conversion destination class. May not be null.
      eReason - The reason code why the transformation failed. May not be null.
      aCause - A causing exception. May be null.
  • Method Details

    • getSrcClass

      @Nullable public Class<?> getSrcClass()
      Returns:
      The conversion source class. Never null.
    • getDstClass

      @Nonnull public Class<?> getDstClass()
      Returns:
      The conversion destination class. Never null.
    • getReason

      Returns:
      The conversion failing reason. Never null.