error property

  1. @override
Object get error
override

Returns last emitted error, failing if there is no error. See hasError to determine whether error has already been set.

Throws ValueStreamError if this Stream has no error.

See also errorOrNull.

Implementation

@override
Object get error {
  final errorAndSt = _wrapper.errorAndStackTrace;
  if (errorAndSt != null) {
    return errorAndSt.error;
  }
  throw ValueStreamError.hasNoError();
}