ClassCastException
class in package klyn

    public class ClassCastException extends UncheckedException:

Object
└ Exception
└ 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
property Inherited Properties from Exception: message
property Inherited 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
method Inherited Methods from UncheckedException: toString
method Inherited Methods from Exception: toString
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml