Class ImproperTypeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.lukebemish.brainfrick.lang.runtime.ImproperTypeException
- All Implemented Interfaces:
Serializable
An exception thrown to indicate that a type cannot be unboxed into another type. Differs from a
ClassCastException
in that no cast was attempted; there was just no known path from existing to target type.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionImproperTypeException
(String msg, Class<?> existingType, Class<?> targetType) Creates a newImproperTypeException
with the given message and initial and target types. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
existingType
The original type of the object. -
targetType
The type that the object could not be unboxed to or turned into.
-
-
Constructor Details
-
ImproperTypeException
Creates a newImproperTypeException
with the given message and initial and target types.- Parameters:
msg
- The detail message.existingType
- The original type of the object.targetType
- The type the object could not be turned into.
-