Maybe<T>.error constructor

const Maybe<T>.error(
  1. Object error, [
  2. StackTrace? stackTrace
])

Create a Maybe that holds the exception error.

The resulting Maybe represents a failure to compute a value.

Implementation

const factory Maybe.error(Object error, [StackTrace? stackTrace]) = MaybeError;