Result<T>.error constructor

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

Creates a Result holding an error.

Alias for ErrorResult.new.

Implementation

factory Result.error(Object error, [StackTrace? stackTrace]) =>
    ErrorResult(error, stackTrace);