Re: [whatwg/streams] Remove _errored and _storedError from TransformStream (#800)

ricea commented on this pull request.



> @@ -277,7 +240,11 @@ class TransformStreamDefaultController {
       throw defaultControllerBrandCheckException('error');
     }
 
-    TransformStreamError(this._controlledTransformStream, reason);
+    if (this._controlledTransformStream._readable._state !== 'readable') {
+      throw new TypeError('TransformStream is not in a state that can be errored');
+    }
+
+    TransformStreamDefaultControllerError(this, reason);

I was thinking it might be useful as a hook for other standards, but since they are more likely to just throw from transform(), maybe not?

-- 
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/pull/800#discussion_r140467850

Received on Friday, 22 September 2017 11:10:48 UTC