Cause<E> class sealed

Represents the cause of an effect failure.

A cause can be either an expected error (Fail) or an unexpected defect (Die).

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<E2>(E2 f(E)) Cause<E2>
Maps the error type of this cause
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toException() Exception
Converts this cause to an exception that can be thrown
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

die(Object throwable, [StackTrace? stackTrace]) Cause<Never>
Creates a Die cause from an unexpected throwable
fail<E>(E error) Cause<E>
Creates a Fail cause from an expected error