Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Align exception throwing wording with IDL.

  • Loading branch information...
commit 9d1febdfc8d10a186387e1081d5810f4de3cba2b 1 parent bf3fb56
@annevk annevk authored
Showing with 28 additions and 30 deletions.
  1. +13 −14 Overview.src.html
  2. +15 −16 dom-core.html
View
27 Overview.src.html
@@ -399,26 +399,25 @@ <h2 class=no-num>Goals</h2>
};</pre>
<p>The <dfn title=dom-DOMException-code><code>code</code></dfn> exception
-field must return the value it was initialized to. When an exception is
-created it must be initialized to zero.
+field must return the value it was initialized to.
<p>To <dfn title=concept-throw>throw</dfn> a <var title>name</var> exception
-these steps must be run:
+run these steps:
<ol>
- <li><p>Create a new <code>DOMException</code> exception whose
- <span data-anolis-spec=webidl>name</span> is <var title>name</var>.
+ <li><p>Let <var title>code</var> be zero.
- <li><p>Set its <span data-anolis-spec=webidl>message</span> to a
- user agent-defined value.
-
- <li><p>If its <span data-anolis-spec=webidl>name</span> is in the first
- column of the <span>error names table</span> and has a corresponding legacy
+ <li><p>If <var title>name</var> is in the first column of the
+ <span>error names table</span> and has a corresponding legacy
<code title=dom-DOMException-code>code</code> exception field value in the
- third column, set its <code title=dom-DOMException-code>code</code>
- exception field to that value.
-
- <li><p><span data-anolis-spec=webidl>Throw</span> the exception.
+ third column, set <var title>code</var> to that value.
+
+ <li><p><span data-anolis-spec=webidl>Throw</span> a new
+ <code>DOMException</code> exception, whose
+ <span data-anolis-spec=webidl>message</span> is a user agent-defined value,
+ <span data-anolis-spec=webidl>name</span> is <var title>name</var>, and
+ whose <code title=dom-DOMException-code>code</code> exception field is
+ <var title>code</var>.
</ol>
<p class=example>To
View
31 dom-core.html
@@ -10,7 +10,7 @@
<p><a class="logo" href="//www.whatwg.org/"><img alt="WHATWG" height="100" src="//resources.whatwg.org/logo-dom.svg" width="100"></a></p>
<h1>DOM</h1>
- <h2 class="no-num no-toc" id="living-standard-—-last-updated-5-december-2012">Living Standard — Last Updated 5 December 2012</h2>
+ <h2 class="no-num no-toc" id="living-standard-—-last-updated-6-december-2012">Living Standard — Last Updated 6 December 2012</h2>
<dl>
<dt>This Version:
@@ -42,7 +42,7 @@ <h2 class="no-num no-toc" id="living-standard-—-last-updated-5-december-2012">
<p class="copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/80x15.png"></a>
To the extent possible under law, the editors have waived all copyright and
related or neighboring rights to this work. In addition, as of
-5 December 2012, the editors have made this specification available
+6 December 2012, the editors have made this specification available
under the
<a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open Web Foundation Agreement Version 1.0</a>,
which is available at
@@ -472,26 +472,25 @@ <h3 id="exception-domexception"><span class="secno">3.1 </span>Exception <code><
};</pre>
<p>The <dfn id="dom-domexception-code" title="dom-DOMException-code"><code>code</code></dfn> exception
-field must return the value it was initialized to. When an exception is
-created it must be initialized to zero.
+field must return the value it was initialized to.
<p>To <dfn id="concept-throw" title="concept-throw">throw</dfn> a <var title="">name</var> exception
-these steps must be run:
+run these steps:
<ol>
- <li><p>Create a new <code><a href="#domexception">DOMException</a></code> exception whose
- <a class="external" data-anolis-spec="webidl" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-exception-name">name</a> is <var title="">name</var>.
+ <li><p>Let <var title="">code</var> be zero.
- <li><p>Set its <a class="external" data-anolis-spec="webidl" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-exception-message">message</a> to a
- user agent-defined value.
-
- <li><p>If its <a class="external" data-anolis-spec="webidl" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-exception-name">name</a> is in the first
- column of the <a href="#error-names-table">error names table</a> and has a corresponding legacy
+ <li><p>If <var title="">name</var> is in the first column of the
+ <a href="#error-names-table">error names table</a> and has a corresponding legacy
<code title="dom-DOMException-code"><a href="#dom-domexception-code">code</a></code> exception field value in the
- third column, set its <code title="dom-DOMException-code"><a href="#dom-domexception-code">code</a></code>
- exception field to that value.
-
- <li><p><a class="external" data-anolis-spec="webidl" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-throw">Throw</a> the exception.
+ third column, set <var title="">code</var> to that value.
+
+ <li><p><a class="external" data-anolis-spec="webidl" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-throw">Throw</a> a new
+ <code><a href="#domexception">DOMException</a></code> exception, whose
+ <a class="external" data-anolis-spec="webidl" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-exception-message">message</a> is a user agent-defined value,
+ <a class="external" data-anolis-spec="webidl" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-exception-name">name</a> is <var title="">name</var>, and
+ whose <code title="dom-DOMException-code"><a href="#dom-domexception-code">code</a></code> exception field is
+ <var title="">code</var>.
</ol>
<p class="example">To
Please sign in to comment.
Something went wrong with that request. Please try again.