Dealing with `Either.catch()` being a suspend has ...
# arrow
e
Dealing with
Either.catch()
being a suspend has turned out to be quite a pain …why is it unsafe to make my own
catch()
function that is not a suspend version? …as in what problem will I run into …keep in mind that I am not using coroutines in the code in question …I have a large number of functions that wrap other functions to return their exceptions as a
Left
. My code is getting quite ugly as I am having to weave a lot of
runBlocking { }
into my call stacks …namely inside of
flatMap { }
and
handleErrorWith { }
p
We’ve discussed adding a non-suspend copy of the function to a client’s codebase like yours as an okay thing to do. It’s just not something we want to encourage as a library
👍 1