public class ClassCastException extends UncheckedException:
Exception raised when an explicit cast cannot be performed at runtime.
@param message Description of the failed cast.
value as Object = "abc" try: number = value as Int catch exc as ClassCastException: println(exc.message)
| Modifier and Type | Member | Description |
|---|---|---|
| public | ClassCastExceptionClassCastException(message as String = "Invalid cast"): |
Creates a class cast exception. |