com.r3corda.core / ErrorOr

# ErrorOr

`data class ErrorOr<out A>`

Representation of an operation that may have thrown an error.

### Constructors

<init> | `ErrorOr(value: A)`

### Properties

error | `val error: Throwable?`
value | `val value: A?`

### Functions

bind | `fun <B> bind(function: (A) -> ErrorOr<B>): ErrorOr<Nothing>`
combine | `fun <B, C> combine(other: ErrorOr<B>, function: (A, B) -> C): ErrorOr<C>`
getOrThrow | `fun getOrThrow(): A`
map | `fun <B> map(function: (A) -> B): <ERROR CLASS>`
match | `fun <T> match(onValue: (A) -> T, onError: (Throwable) -> T): T`

### Companion Object Functions

catch | `fun <T> catch(body: () -> T): ErrorOr<T>` Runs the given lambda and wraps the result.
of | `fun of(t: Throwable): ErrorOr<Nothing>`