nickk
05/08/2019, 8:14 AMThrowable
was an alias for java.lang.Exception
on the JVM?
Anyway, I have run into this problem: kotlin.NotImplementedError cannot be cast to java.lang.Exception
and I am thinking what is the best way to avoid it. It happens somewhere in my java dependencies (RxJava perhaps).
Your thoughts, please?louiscad
05/08/2019, 8:17 AMlouiscad
05/08/2019, 8:17 AMnickk
05/08/2019, 8:19 AMalex2069
05/08/2019, 8:20 AMkotlin.RuntimeException::class == java.lang.RuntimeException:class
alex2069
05/08/2019, 8:20 AMtypealias
(I think in older versions it was a typealias
though)louiscad
05/08/2019, 8:21 AMkarelpeeters
05/08/2019, 8:22 AMhttps://www.javamex.com/tutorials/exceptions/ExceptionHierarchy.png▾
nickk
05/08/2019, 8:22 AMnickk
05/08/2019, 8:24 AMkarelpeeters
05/08/2019, 8:24 AMlouiscad
05/08/2019, 8:24 AMnickk
05/08/2019, 8:27 AMTODO()
calls. Let’s move on.hho
05/08/2019, 9:03 AMException
still is a `typealias`: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-exception/index.htmlalex2069
05/08/2019, 9:11 AMactual
(I was looking at the expect
definitions which are classes) - makes a lot more sense that it's still a typealias
on JVM rather than some weird compile-time magic (beyond typealias
lol)fabianishere
05/08/2019, 9:28 AMException
? Since Exception
itself does not provide any properties or methods, you are better leaving it as a Throwable
in this case.karelpeeters
05/08/2019, 10:35 AM