Class InvalidClassTypeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.github.javinator9889.utils.errors.InvalidClassTypeException
-
- All Implemented Interfaces:
java.io.Serializable
public class InvalidClassTypeException extends java.lang.RuntimeException
Custom exception called when retrieving data fromArgumentParser
and the data type is not the specified one. For example, if you callArgumentParser.getInt(String)
and the value assigned to thatString
is not anInteger
but aArrayList
, this exception is thrown.Also, in the same example as above, if the value is
null
, this exception is also thrown asIntegers
cannot benull
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InvalidClassTypeException(java.lang.String message)
Constructs a new runtime exception with the specified detail message.
-
-
-
Constructor Detail
-
InvalidClassTypeException
public InvalidClassTypeException(java.lang.String message)
Constructs a new runtime exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call toThrowable.initCause(java.lang.Throwable)
.- Parameters:
message
- the detail message. The detail message is saved for later retrieval by theThrowable.getMessage()
method.
-
-