- From: Jonas Sicking <jonas@sicking.cc>
- Date: Wed, 26 Oct 2011 22:23:26 -0700
- To: Israel Hilerio <israelh@microsoft.com>
- Cc: "public-webapps@w3.org" <public-webapps@w3.org>
On Wed, Oct 26, 2011 at 11:41 AM, Israel Hilerio <israelh@microsoft.com> wrote: > Based on the feedback from Jonas, Cameron, and Anne, we updated the exception and error model in the IndexedDB spec [1]. Now, we match the DOM Level 4 events and error models. > > The IDBDatabaseException interface was replaced with DOMException. The const error codes were replace with error type names. We are reusing the DOM 4 Level exception names, where possible. Where not possible, we introduced new error names to be used in the exceptions and error events. Also, the errorCode attribute was replaced with a DOMError attribute which contains an error object. > > Please review and let us know if we missed anything. Yay! This looks awesome. I did find some issues which I've checked in a fix for. These are the things I've changed: createObjectStore/createIndex should throw a SyntaxError if the keypath isn't a valid keypath. createObjectStore/createIndex shouldn't throw if the optionalParameter object contains parameters other than the known ones. I also did some other dictionary related cleanup while I was touching this anyway. If createIndex is called with an Array as keyPath and multientry is set to true, we should throw a NotSupportedError. We didn't actually discuss this one (I missed it in my NON_TRANSIENT_ERR lineup), but TypeError seems wrong. NotSupportedError seemed like the best match I could find. transaction should throw InvalidAccessError if called with an empty array or DOMStringList. Let me know if anything sounds wrong. / Jonas
Received on Thursday, 27 October 2011 05:24:31 UTC