W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

[indexeddb] New WebIDL Exception Model for IndexedDB

From: Israel Hilerio <israelh@microsoft.com>
Date: Thu, 22 Sep 2011 22:52:39 +0000
To: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <F695AF7AA77CC745A271AD0F61BBC61E3D271C0F@TK5EX14MBXC119.redmond.corp.microsoft.com>
Jonas,

This is our understanding on how the spec needs to change to support the new WebIDL exception handling model.  We would start by removing all of the constants from IDBDatabaseException.  After that, the only thing left would be message.  Do we still need to have this class definition?  It seems we can remove it.

In either case, we would have to continue by defining a set of exception types and code mappings. Each exception type will have a code value of 0. 

The mapping will look like this:
UnknownError(0)
NonTransientError(0)
NotFoundError(0)
ConstraintError(0)
DataError(0)
NotAllowedError(0)
TransactionInactiveError(0)
AbortError(0)
ReadOnlyError(0)
TimeoutError(0)
QuotaError(0)
VersionError(0)

If we believe the message attribute is still relevant, then we would define the IDBDatabaseException class like this:
exception IDBDatabaseException: DOMException {
    DOMString      message;
};
Using this approach, IDBDatabaseException will inherit the name and code properties from DOMException.

Is this what you had in mind?

Thanks,

Israel
Received on Thursday, 22 September 2011 22:53:08 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT