This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25899 - Do not specify messages for DOMExceptions
Summary: Do not specify messages for DOMExceptions
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Encrypted Media Extensions (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: David Dorwin
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-28 00:08 UTC by Chris Pearce
Modified: 2014-08-25 19:10 UTC (History)
6 users (show)

See Also:


Attachments

Description Chris Pearce 2014-05-28 00:08:54 UTC
The DOM spec defines what the description are for each exception name:
http://www.w3.org/TR/dom/#error-names

But the EME spec is also specifying optional messages/descriptions for exception names that are defined in the main DOM spec linked above:
https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html#exceptions

As far as we can tell there's no wiggle room in the DOM spec to allow the exception messages to vary. So either we should add new exceptions for EME with the desired codes, or we should drop the new messages.
Comment 1 Anne 2014-05-28 07:30:07 UTC
In particular, .message is up to the UA and is expected to be localized and such. You cannot state what the content should be as a requirement.
Comment 2 David Dorwin 2014-05-28 17:49:44 UTC
I believe the summary should be changed to "Do not specify messages for exceptions." Chris, do you agree?

The most important action is to remove the "and that has the message" text from the algorithms.

Is there any value documenting how the exceptions are used in the table? The Possible Messages column could be changed to specified causes along with slight changes to the message text. For what it's worth, the table was based modeled after http://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-Exceptions.
Comment 3 Chris Pearce 2014-05-28 21:08:02 UTC
(In reply to David Dorwin from comment #2)
> I believe the summary should be changed to "Do not specify messages for
> exceptions." Chris, do you agree?

Yes, I agree. That would be fine.
 

> Is there any value documenting how the exceptions are used in the table? The
> Possible Messages column could be changed to specified causes along with
> slight changes to the message text.

I think changing the table to be a list reasons why the exceptions fire is reasonable.

> For what it's worth, the table was based
> modeled after http://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-Exceptions.

Then by the same rationale, that table needs to change too. ;)
Comment 4 Anne 2014-05-29 09:10:52 UTC
Filed bug 25912 on crypto.
Comment 5 Mark Watson 2014-06-03 15:07:18 UTC
The table in WebCrypto was in turn inspired by that in IndexedDB: http://www.w3.org/TR/IndexedDB/#exceptions
Comment 6 Anne 2014-06-03 15:10:38 UTC
Indexed DB makes no normative requirements regarding .message (although it is somewhat misleading and the text could be improved).
Comment 7 David Dorwin 2014-07-07 23:53:09 UTC
Implemented in https://dvcs.w3.org/hg/html-media/rev/dfb8b1fdb2ee.

I removed the "and that has the message..." text and clarified that the table includes possible causes from the algorithms.

For reference, the original messages specified within the algorithms can be seen at https://dvcs.w3.org/hg/html-media/raw-file/ff10d356cc07/encrypted-media/encrypted-media.html.
Comment 8 David Dorwin 2014-08-25 19:10:13 UTC
https://dvcs.w3.org/hg/html-media/rev/4e31f7807448 removes " and that has an appropriate message" from steps that do not specify the exact error name. These were missed in the previous changeset.