I like this pattern a lot, I even include own impl...
# functional
g
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
Can you share an example of this
g
Of what? How to work with Try? Or how does it work on kotlin-coroutines-retrofit?
c
Your "own implementation of Result class (with value, HttpError and Exception cases)"
yeah, with Try
c
Awesome. Thanks!
g
Just common Sealed class, but used to represent success or error, similar to Try
1
c
Nice. Would take a look. Thanks