ClassCastException
classin packageklyn
public class ClassCastException extends UncheckedException
└ ClassCastException

Exception raised when an explicit cast cannot be performed at runtime.

Example
value as Object = "abc"
try:
    number = value as Int
catch exc as ClassCastException:
    println(exc.message)
Inherited Properties
propertyInherited Properties from Exception: message
propertyInherited Properties from Object: type
Constructors
Modifier and Type Member Description
public ClassCastException
ClassCastException(message as String = "Invalid cast")
Creates a class cast exception.
Inherited Methods
methodInherited Methods from UncheckedException: toString
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml