christophsturm
12/09/2020, 10:40 AMopen class ApplicationException(message: String, cause: Throwable?) : RuntimeException(message, cause)
Edgars
12/09/2020, 10:48 AMgetMessage()
/`setMessage()` methods in RuntimeException can still return a nullable value or set the message to null
. If your subclass overrides those methods, then you could make it work.Edgars
12/09/2020, 10:51 AMopen class FooException : RuntimeException() {
override val message: String = super.message ?: "default message"
}
Edgars
12/09/2020, 10:52 AMopen class FooException(msg: String) : RuntimeException() {
override val message: String = msg
}
christophsturm
12/09/2020, 10:54 AMopen class ApplicationException(override val message: String, cause: Throwable?) : RuntimeException(message, cause)
but it seems to work. thanksEdgars
12/09/2020, 10:56 AMchristophsturm
12/09/2020, 10:57 AMEdgars
12/09/2020, 11:17 AM