Defining an exception type

Exception handling

class SimpleException: Exception()

class RecommendExc: Exception {
    //recommended constructors
    constructor(): super()
    constructor(message: String): super(message)
}

throw SimpleException() //<- Error

throw RecommendExc("exeption") //<- Error