Hi, is there a counterpart of `IO.handleError` in ...
# arrow
d
Hi, is there a counterpart of
IO.handleError
in new Fx based on
suspend
functions?
s
Either.catch { mySuspendFun() }.handleErrorWith
☝️ 1
d
I’m looking for a way to add “final” error handler that would “catch” any unhandled exceptions.
Either.catch
as I understand should be used to execute side effect - similar to “legacy”
IO.effect
. Before running final
IO
I was always adding
handleError
to be sure that none of unexpected exceptions will escape.
s
You could also do a try catch block. It works as expected with suspended functions