Package com.helger.commons.typeconvert
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 theTypeConverterclass if type conversion fails.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypeConverterException.EReason
-
Constructor Summary
Constructors Constructor Description TypeConverterException(Class<?> aDstClass, TypeConverterException.EReason eReason)Constructor only with a destination class.TypeConverterException(Class<?> aSrcClass, Class<?> aDstClass, TypeConverterException.EReason eReason)Constructor.TypeConverterException(Class<?> aSrcClass, Class<?> aDstClass, TypeConverterException.EReason eReason, Throwable aCause)Constructor with a cause exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>getDstClass()TypeConverterException.EReasongetReason()Class<?>getSrcClass()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
TypeConverterException
public TypeConverterException(@Nonnull Class<?> aDstClass, @Nonnull TypeConverterException.EReason eReason)
Constructor only with a destination class.- Parameters:
aDstClass- The conversion destination class. May not benull.eReason- The reason code why the transformation failed. May not benull.
-
TypeConverterException
public TypeConverterException(@Nonnull Class<?> aSrcClass, @Nonnull Class<?> aDstClass, @Nonnull TypeConverterException.EReason eReason)
Constructor.- Parameters:
aSrcClass- The conversion source class. May not benull.aDstClass- The conversion destination class. May not benull.eReason- The reason code why the transformation failed. May not benull.
-
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 benull.aDstClass- The conversion destination class. May not benull.eReason- The reason code why the transformation failed. May not benull.aCause- A causing exception. May benull.
-
-
Method Detail
-
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
@Nonnull public TypeConverterException.EReason getReason()
- Returns:
- The conversion failing reason. Never
null.
-
-