Throw -> return a Promise rejected with
authorTakeshi Yoshino <tyoshino@google.com>
Tue, 14 Jan 2014 23:04:48 +0900
changeset 130 e8f1ead18653
parent 129 855e24afba79
child 131 5db012bd990c
Throw -> return a Promise rejected with
Overview.htm
--- a/Overview.htm	Tue Jan 14 22:56:35 2014 +0900
+++ b/Overview.htm	Tue Jan 14 23:04:48 2014 +0900
@@ -805,9 +805,9 @@
 					<p>
 						This method must run the steps below:
 						<ol>
-							<li>If <a href="#widl-ReadableStream-readBinaryAs">readBinaryAs</a> is "<code>text</code>" throw a "<code><a>SyntaxError</a></code>"</li>
+							<li>If <a href="#widl-ReadableStream-readBinaryAs">readBinaryAs</a> is "<code>text</code>", return a <a>Promise</a> rejected with a "<code><a>SyntaxError</a></code>"</li>
 
-							<li>If <a>readPending</a> is set, throw an "<code><a>InvalidStateError</a></code>"</li>
+							<li>If <a>readPending</a> is set, return a <a>Promise</a> rejected with an "<code><a>InvalidStateError</a></code>"</li>
 							<li>Set <a>readPending</a></li>
 
 							<li>Let <var>latchedType</var> be the current value of <a href="#widl-ReadableStream-readBinaryAs">readBinaryAs</a></li>
@@ -890,7 +890,7 @@
 						This method must run the steps below:
 
 						<ol>
-							<li>If <a>readPending</a> is set, throw an "<code><a>InvalidStateError</a></code>"</li>
+							<li>If <a>readPending</a> is set, return a Promise reject with an "<code><a>InvalidStateError</a></code>"</li>
 							<li>Set <a>readPending</a></li>
 
 							<li>Let <var>latchedType</var> be the current value of <a href="#widl-ReadableStream-readBinaryAs">readBinaryAs</a> attribute</li>
@@ -1034,7 +1034,7 @@
 						This method must run the steps below:
 
 						<ol>
-							<li>If <a>readPending</a> is set, throw an "<code><a>InvalidStateError</a></code>"</li>
+							<li>If <a>readPending</a> is set, return a <a>Promise</a> rejected with an "<code><a>InvalidStateError</a></code>"</li>
 							<li>Set <a>readPending</a></li>
 
 							<li>Run <a>abort waiting</a> algorithm on <var>destination</var></a>