RE: [indexeddb] New WebIDL Exception Model for IndexedDB

On Sat, 1 Oct 2011, Israel Hilerio wrote:
> 
> We believe it is simpler and closer to the intent on the WebIDL spec to 
> say: Throws a DOMException of type " VersionError".
> 
> Instead of having to explain what it means to throw a type as an 
> exception: To throw a “VersionError” exception, a user agent would 
> construct a DOMException exception whose type is " VersionError " and 
> code exception field value is 0, and actually throw that object as an 
> exception.

If you use WebIDL directly, don't forget to specify the value for the 
'code' and 'message' attributes of the exception object.

(The reason I made the HTML spec use the DOM Core definition here is that 
it takes care of all the various features of DOMException so I don't have 
to worry about them at all.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 3 October 2011 19:54:46 UTC