I like this pattern a lot, I even include own implementation of Result class (with value, HttpError and Exception cases) to my kotlin-coroutines-retrofit adapter, because it’s much more pleasant and safe to use something like this with coroutines (and not only with coroutines, but with any IO code)
c
chi
02/22/2018, 7:47 AM
Can you share an example of this
g
gildor
02/22/2018, 7:47 AM
Of what?
How to work with Try?
Or how does it work on kotlin-coroutines-retrofit?
c
chi
02/22/2018, 7:48 AM
Your "own implementation of Result class (with value, HttpError and Exception cases)"