[whatwg] SQL API and openDatabase()

In the provided spec, openDatabase() can fail in exactly one case,  
leading to an exception:
"If the database version provided is not the empty string, and the  
database already exists but has a different version, then the method  
must raise an INVALID_STATE_ERR exception."

For the sake of providing implementation feedback, I'd like to add  
another specified failure condition:
If the user agent decides for policy reasons that a database should  
not be opened/created (the origin's quota has already been met/ 
exceeded, the user has disabled databases altogether, etc), there  
should be an exception.

For the sake of argument, I can't think of any existent error code  
that works better than INVALID_STATE_ERR.  NO_DATA_ALLOWED_ERR fits  
based on name alone, but not based on intended use.

Thoughts?

Thanks,
~Brady

Received on Tuesday, 27 November 2007 13:56:36 UTC