W3C home > Mailing lists > Public > public-html@w3.org > June 2009

[webstorage] IndexGetter Methods Should Not Throw Exception

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Fri, 05 Jun 2009 13:39:18 +0200
Message-ID: <4A2903E6.3090405@lachy.id.au>
To: public-html <public-html@w3.org>
Hi,
   The IndexGetter methods for both the Storage interface (key(index)) 
and the SQLResultSetRowList interface (item(index)) are currently 
defined to thrown an INDEX_SIZE_ERR when the index is out of bounds.

For the following reasons, the spec should instead say that null should 
be returned instead.

* Consistency with other DOM APIs, such as NodeList.item()
* Doesn't require authors to use try/catch blocks to catch unexpected
   errors.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Friday, 5 June 2009 11:40:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:04 UTC