how do you catch a `java.net.ConnectException` in...
# multiplatform
n
how do you catch a
java.net.ConnectException
in common code? i cannot define a
expect class ConnectException: Exception
because that extends
kotlin.Exception
and not the java exception type.. and without that i cannot catch it.. event
catch)e: Throwable)
in common code does not catch it
b
Isn't kotlin.Exception a typealias to java Exception on jvm?
a
actually
kotlin.Exception
is a typealias to java
Exception
when targeting jvm. So, your
expect/actual
should just work
👆 1