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

[IndexedDB] Exceptions in IDB and the DOMException

From: Pablo Castro <Pablo.Castro@microsoft.com>
Date: Wed, 20 Apr 2011 06:13:42 +0000
To: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <F108E2F6BA743C4696146F0B7111C2611761E3@TK5EX14MBXC243.redmond.corp.microsoft.com>
This came up today that I didn't remember having a conversation about it with folks.

We currently have IDBDatabaseException with a some error codes as constants and code/message properties. Looking at DOMException as defined in DOM Core [1], it turns out that a) the pattern of the class is identica, but instead of code/message it has code/name and b) there are some errors present in both or that are very close (e.g. NOT_FOUND_ERR, DATA_CLONE_ERR, QUOTA_EXCEEDED_ERR). 

Would it be worth it trying to use the constants of DOMException when there's one already there that matches the need? If that was the case, would be it the constants that we would be reusing or would be have to throw a DOMException instead of an IDBDatabaseException?

Separately, in reference to a) above, should we change IDBDatabaseException.message to IDBDatabaseException.name for consistency?


[1] http://www.w3.org/TR/2010/WD-domcore-20101007/#exception-domexception
Received on Wednesday, 20 April 2011 06:14:14 UTC

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