NullStreamSink< T>.error constructor
Creates a null sink whose done future emits error
.
Note that this error will not be considered uncaught.
Implementation
NullStreamSink.error(error, [StackTrace stackTrace])
: done = new Future.error(error, stackTrace)
// Don't top-level the error. This gives the user a change to call
// [close] or [done], and matches the behavior of a remote endpoint
// experiencing an error.
..catchError((_) {});