- 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>
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. Cheers, Adrian.
Received on Monday, 11 April 2011 16:06:23 UTC