Re: [whatwg/streams] alert underlyingSink when [[strategySize]]() fails (#628)

My preference is to punt on this issue until we add a finally() method. In
the meantime I think we can say that as with write(), handling errors in
strategySize is the responsibility of the strategy author.

2016/12/13 午前2:59 "isonmad" <notifications@github.com>:

> Like the code currently notes:
>
> // TODO: Should we notify the sink of this error?
>
> For readable streams, the underlyingSource gets notified because the
> exception gets rethrown from controller.enqueue(), which isn't an option
> for writable streams.
>
> Without a way to know when the stream becomes errored due to the strategy
> throwing or returning an invalid number, there's no way to know that it
> should clean up its resources, or to propagate the error forward if the
> writable stream is just one end of a transform stream.
>
> Should underlyingSink.abort be overloaded to also be called with a) the
> exception size() threw, or b) a RangeError if it returned a bad value, and
> not just when a producer calls writer.abort()? That or add an entirely
> new callback method just for this to either the sink or to the strategy
> itself.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/whatwg/streams/issues/628>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AGXnh_YNeAn35q0kltMZm6AG6zETx4_Lks5rHgodgaJpZM4LLSOg>
> .
>


-- 
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/628#issuecomment-266778598

Received on Tuesday, 13 December 2016 16:02:44 UTC