https://kotlinlang.org logo
#arrow
Title
l

Leandro Borges Ferreira

09/26/2018, 2:23 AM
I used the
attempt()
of IO. Like this:
Copy code
someCommand(IO.monadDefer(), arg1)
                    .fix()
                    .attempt()
                    .unsafeRunSync()
                    .fold({ error ->
                        raiseError<List<Log>>(createErrorLogs("It was not possible to run the command", error))
                    }, {
                        just(it)
                    })
                    .bind()