failure

fun failure(message: String, throwable: Throwable? = null, outcome: Outcome<*>? = null): Outcome.Failure

Creates a Failure with the specified message, throwable, and optional nested outcome.

Return

A Failure instance.

Parameters

message

A description of the failure.

throwable

An optional Throwable that caused the failure.

outcome

An optional nested Outcome for chained failures.


fun failure(throwable: Throwable, outcome: Outcome<*>? = null): Outcome.Failure

Creates a Failure with the specified throwable and optional nested outcome.

Return

A Failure instance with a default message.

Parameters

throwable

The Throwable that caused the failure.

outcome

An optional nested Outcome for chained failures.


fun failure(outcome: Outcome<*>? = null): Outcome.Failure

Creates a Failure with an optional nested outcome.

Return

A Failure instance with a default message.

Parameters

outcome

An optional nested Outcome for chained failures.