This came up today that I didn't remember having a conversation about it with 
folks.

We currently have IDBDatabaseException with a some error codes as constants and 
code/message properties. Looking at DOMException as defined in DOM Core [1], it 
turns out that a) the pattern of the class is identica, but instead of 
code/message it has code/name and b) there are some errors present in both or 
that are very close (e.g. NOT_FOUND_ERR, DATA_CLONE_ERR, QUOTA_EXCEEDED_ERR). 

Would it be worth it trying to use the constants of DOMException when there's 
one already there that matches the need? If that was the case, would be it the 
constants that we would be reusing or would be have to throw a DOMException 
instead of an IDBDatabaseException?

Separately, in reference to a) above, should we change 
IDBDatabaseException.message to IDBDatabaseException.name for consistency?

Thanks
-pablo

[1] http://www.w3.org/TR/2010/WD-domcore-20101007/#exception-domexception


Reply via email to