https://kotlinlang.org logo
#ktor
Title
# ktor
j

Jan Stoltman

10/13/2019, 6:56 PM
Hey guys, I'm writing a multiplatform client app with ktor using OkHttp on Android and Ios on iOS. I would like to be able to catch and handle all connection related exceptions (eg.
SocketTimeoutException
,
UnknownHostException
on Android) in my common code, but propagate any other exception. Is there a way to solve my problem ktor?
b

Big Chungus

10/13/2019, 9:39 PM
Write an expect function to handle propagation and use that in else case on your error handler
3 Views