[Bug 26776] Diagnosing and resolving CDM errors needs a numeric systemCode (deleted with MediaKeyError)

https://www.w3.org/Bugs/Public/show_bug.cgi?id=26776

--- Comment #20 from David Dorwin <ddorwin@google.com> ---
(In reply to Chris Pearce from comment #17)
> (In reply to David Dorwin from comment #16)
> > At the last meeting, Jerry said he would add a proposal (for an attribute)
> > to this bug [1].
> > [1] http://www.w3.org/2014/12/16-html-media-minutes.html#item07
> 
> A proposal for an attribute seems sub-optimal, as if there are multiple
> errors to be reported by the CDM, only the last can be reported, which could
> result in un-observed error codes being overwritten by subsequent errors.
Implementations could ensure that the relevant value is recorded. Applications
are likely to check the value after some other event, so it's unlikely that
system codes from unrelated events will be overwritten.

If we are concerned about this, we could use a sequence of system codes
instead.
> 
> Why can't we just subclass something other than DOMException with a
> systemCode attribute?
Where/how would you use this new object?
See #2 in comment 10 for all the places where a system code _might_ be useful.

> If we can't subclass Error, then how about Event?
One of the concerns is exposing implementation-specific values to the
application (see, for example, Anne's comments in bug 25896), especially in a
way that might affect application logic. The primary use case is reporting to
the server for offline error analysis (comment 11). Thus, it would be better if
the design encouraged reporting and discouraged switching. Providing the code
in an event would do the opposite (comment 12).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 16 January 2015 21:40:06 UTC