We have a piece of code that delegates to an inter...
# arrow
f
We have a piece of code that delegates to an interface call wrapped in a try catch. The implementations are supposed to throw exceptions if something goes wrong. I'm creating a new interface implementation that uses Arrow Eithers. I figure at the very last line I will call
Copy code
either.fold({ RuntimeException(something went wrong $it) }, { it })
in order to make it throw the error as an exception, but not sure how idiomatic that is.. should I call some other method on the either?