Re: [indexeddb] New WebIDL Exception Model for IndexedDB

On Tue, 27 Sep 2011 02:40:29 +0200, Israel Hilerio <>  
> Like Cameron says in the link above and based on the WebIDL description,  
> it seems we want the IndexedDB text to say, for example:
> Throws a DOMException of type " VersionError". (vs. Throw a VersionError  
> exception)

He made a suggestion. I just simplified what you have to say to get the  
same effect, if you use the DOM4 terminology. If the decision is that all  
non-IDL exceptions are DOMException I think my approach is better.

> In addition, it seem that the names I outlined above match the expected  
> naming convention outlined in the link you specified.  However, we  
> shouldn't redefine any types which are already included in the DOM 4  
> exceptions section.  We should just use them and point to them.
> For IndexedDB, we will include the following database specific  
> exceptions in our spec:
> UnknownError
> NonTransientError
> ConstraintError
> DataError
> NotAllowedError
> TransactionInactiveError
> ReadOnlyError
> VersionError
> All of these exceptions will have a code of 0.
> In addition, we would reuse the following types from the DOM 4 Exception  
> section:
> NotFoundError
> AbortError
> TimeoutError
> QuotaExceededError
> While I can see the benefits of having an all-encompassing list of  
> exceptions people can go to see the various types, it seems that this  
> could grow very large and we'll see may exceptions which are not  
> applicable to other technologies.  To that effect, we prefer all new  
> feature specific exceptions to be included in the spec they are used  
> instead of a centralized table.

I think that is the wrong approach. We have shared exception types  
throughout the web platform to date. That is, exceptions are generic  
already. It would be good I think if we not deviated from that and reuse  
exceptions. To do that specification writers need to be able to look up  
somewhere which exceptions are already defined and which are a match for  
what they are doing.

Anne van Kesteren

Received on Tuesday, 27 September 2011 08:11:29 UTC