W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

RE: [FileAPI] Result of calling MultipleReads on FileReader

From: Adrian Bateman <adrianba@microsoft.com>
Date: Mon, 11 Apr 2011 16:05:54 +0000
To: "arun@mozilla.com" <arun@mozilla.com>, Eric Uhrhane <ericu@google.com>
CC: "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>, "Jonas Sicking (jonas@sicking.cc)" <jonas@sicking.cc>, Arun Ranganathan <aranganathan@mozilla.com>
Message-ID: <104E6B5B6535E849970CDFBB1C5216EB3D31E272@TK5EX14MBXC136.redmond.corp.microsoft.com>
On Monday, April 11, 2011 8:28 AM, Arun Ranganathan wrote:
> On 3/31/11 6:12 PM, Eric Uhrhane wrote:
> > I think it's cleaner and simpler just to throw.  FileReader and XHR
> > are already different enough that a bit more, as long as it's a
> > usability improvement, isn't a big deal.  The efficiency improvement
> > is just a bonus.
> Eric: are you sure you mean "throw" or do you mean, fire error event or
> abort?  Note that only FileReaderSync (running on threads) actually
> "throws" in terms of an exception.

I think throwing an exception would be appropriate here. The FileReader
will know synchronously that it is already doing a read and that calling
read again is an invalid operation. Firing the error event should be
reserved for errors that come from the operation of the reader and not
because the developer called it incorrectly.


Received on Monday, 11 April 2011 16:06:23 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:31 UTC