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

spierce7

03/23/2020, 5:49 PM
Is it save to use
<http://io.ktor.utils.io|io.ktor.utils.io>.errors.IOException
for all network IO exceptions across platforms?
l

luke

03/24/2020, 1:12 AM
Can you try writing a Unit Test that throws that Exception?
s

spierce7

03/24/2020, 1:26 AM
I can - but that wouldn’t really answer the question
l

luke

03/24/2020, 1:30 AM
Well it would if you wrote the tests to test it would it not? When you say "save (safe)", what do you mean?
s

spierce7

03/24/2020, 1:34 AM
I’m trying to understand if each platform, when it encounters a network error, will throw an instance of IOException
like the JVM http libs do
l

luke

03/24/2020, 1:45 AM
Ahh, OK. Then you should still be able to write tests for that.
The chances are that they probably throw their own Exceptions, but I couldn't confirm that at this moment.
3 Views