[whatwg/streams] Stop controller.error() and controller.terminate() throwing in unexpected states (#822)

This is related to #821.

It's not helpful for `controller.error()` and `controller.terminate()` to throw when the readable is closed or errored, because there's nothing a transformer can do to recover at that point, and recovery is unlikely to be needed anyway. If the transformer decides it cannot continue, or it doesn't need to continue, but the stream is already in a state that it wouldn't continue anyway, that's not a problem.

`controller.enqueue()`, on the other hand, should still throw if it couldn't enqueue the chunk. Code that assumes the chunk was safely queued should not continue to run.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/822

Received on Tuesday, 3 October 2017 13:15:41 UTC