//arrow-fx-coroutines/arrow.fx.coroutines/Platform/composeErrors

composeErrors

common fun composeErrors(first: Throwable, res: Result<Any?>): Throwable

fun composeErrors(all: <[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)>): [Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)

common fun composeErrors(first: Throwable, vararg rest: Throwable): Throwable

fun composeErrors(first: Throwable, rest: List<Throwable>): Throwable

@JvmName(name = “composeErrorsNullable”)

fun composeErrors(first: Throwable?, other: Throwable?): Throwable?

fun composeErrors(first: Throwable, other: Throwable?): Throwable

fun composeErrors(all: List<Throwable>): Throwable?

Composes multiple errors together, meant for those cases in which error suppression, due to a second error being triggered, is not acceptable.

On top of the JVM this function uses Throwable#addSuppressed, available since Java 7. On top of JavaScript the function would return a CompositeException.

Do you like Arrow?

Arrow Org
<