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>
   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

Lachlan Hunt - Opera Software
Received on Friday, 5 June 2009 11:40:03 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:48 UTC