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

Re: [indexeddb] New WebIDL Exception Model for IndexedDB

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 30 Sep 2011 09:22:59 +0200
To: "Israel Hilerio" <israelh@microsoft.com>
Cc: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <op.v2l1glyl64w2qv@annevk-macbookpro.local>
On Thu, 29 Sep 2011 23:54:50 +0200, Israel Hilerio <israelh@microsoft.com>  
wrote:
> Microsoft believes that the following text closer reflects the intent on  
> the WebIDL spec:
> * Throws a DOMException of type " VersionError".
> (vs. Throw a VersionError exception, which doesn’t accurately capture  
> the intent defined in the WebIDL spec)

Actually, given  
http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-throw it  
does. Which is what I was trying to convey. HTML does this too now:  
http://html5.org/r/6602


> As we mentioned before, we agree on the reuse of existing DOM level 4  
> Exceptions currently contained in the spec.  However, it is our stance  
> that feature specific exceptions should be defined in the spec that they  
> are used in.  With the new WebIDL model, it’s not necessary to “define”  
> the exceptions anywhere. Anyone can just state in their spec: "Throw a  
> DOMException of type FooBar" and that’s it.

Yes, but how do you prevent e.g. WrongVersionError from appearing next to  
VersionError if there is no central lookup? Do you expect people that mint  
new exceptions to look at all specifications that use exceptions? The  
exceptions defined in DOM4 are already not specific to DOM4, e.g.  
NetworkError is mostly for XMLHttpRequest at this point, as is  
TimeoutError.


> This is the pattern we're looking to follow for IndexedDB.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Friday, 30 September 2011 07:23:21 GMT

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