Contact emails
jsb...@chromium.org, phi...@opera.com
Spec
Summary
Replace uses of DOMError (present in `error` attributes) with DOMException
Motivation
We'd like to drop DOMError from the platform, as it is redundant with DOMException. Promises that reject already yield DOMExceptions. A handful of specs surface DOMError types, with IndexedDB being one of them. So... let's start with IndexedDB.
DOMError instances have a `name` attribute (one of the strings defined in specs like WebIDL) and `message` attribute (browser specific, striving to explain the issue)
DOMException instances have a `name` (ditto) and `message` (ditto), as well as a legacy `code`.
So DOMExceptions are a drop-in replacement as far as consumers are concerned.
Compatibility Risk
Since the types have the same attributes, the following will not break:
if (request.error.name === 'ConstraintError') ...
log_to_server(transaction.error.name, transaction.error.message);
Ongoing technical constraints
This does put slightly more onus on us to implement the DOMException constructor in order to allow polyfills, but that was the case already. Otherwise: None.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
OWP launch tracking bug
N/A - if anyone will actually notice this we probably can't make this change.
Link to entry on the feature dashboard
N/A
Requesting approval to ship?
Yep.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
philipj@opera is already working on this: https://code.google.com/p/chromium/issues/detail?id=460725
Can we get a dashboard entry? Developers need to change their error handling and they need to know which version.
(And obviously, if there is something we're missing - like someone is doing unfathomable instanceof tests - we'll revert.)
On Fri, Nov 6, 2015 at 10:08 AM, Joshua Bell <jsb...@google.com> wrote:(And obviously, if there is something we're missing - like someone is doing unfathomable instanceof tests - we'll revert.)
I'm worried about ANY instanceof tests. Isn't that possibility worth a heads-up?