[webkit-dev] Custom exception messages for IDL defined methods that raise DOMException.
ap at webkit.org
Tue Nov 15 10:06:32 PST 2011
14.11.2011, в 18:45, Michael Nordman написал(а):
> Afaict, the "platform" does define a means of expressing exceptional conditions including a means of conveying a message that ideally provides useful information. I'd like to fill in that useful information part, "INVALID_STATE_ERR: DOM Exception 11" isn't particularly useful to anyone. Its fair to say INVALID_STATE for many distinct low level error conditions, there's nothing wrong with the API. My intent in starting this thread was to determine the best way of providing a more detailed message. I don't agree that "error messages are evil"? In the case of websql or indexedDB, where there is a complex backing store of some kind that's likely different across browsers, i think it is helpful to surface useful implementation specific details for diagnostic and debugging purposes.
We have already taken steps that make it easier for sites to collect debug information, most notably window.onerror. I think that it's a good thing, as long as it does not expose information that could be used for nefarious purposes (which doesn't appear to be an issue here).
From experience, sites don't often have multiple code paths for different exceptions, much less for exception strings. So, the effect on compatibility should be minimal if any.
- WBR, Alexey Proskuryakov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev