sindrenm
11/21/2018, 2:56 PMkotlin.RuntimeException
is actually just a typealias for java.lang.RuntimeException
). And all of Kotlin's own exceptions will ultimately inherit from kotlin.Throwable
, whereas Java's exceptions will inherit from java.lang.Throwable
). But does that mean that catching kotlin.Throwable
only won't actually catch e.g. `java.lang.RuntimeException`s?diesieben07
11/21/2018, 3:01 PMkotlin.Throwable
is `java.lang.Throwable`: https://kotlinlang.org/docs/reference/java-interop.html#mapped-typessindrenm
11/21/2018, 3:02 PMkotlin.Throwable
in the IDE and saw this, which made me wonder.
public open class Throwable(open val message: String?, open val cause: Throwable?) {
// ...
}
Thanks!diesieben07
11/21/2018, 3:03 PMsindrenm
11/21/2018, 3:03 PMsindrenm
11/21/2018, 3:04 PMkotlin.Throwable
from that call-site.
Oh well, back to the drawing board. Thanks, @diesieben07! :D