Skip to content

Commit 5fac9fd

Browse files
committed
Add no-exception Assert documentation. Closes #109.
1 parent e3e8f94 commit 5fac9fd

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

spec.bs

+15-1
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,16 @@ The <dfn attribute for=Subscriber><code>signal</code></dfn> getter steps are to
205205
[=Subscriber/next algorithm=] given |value|.
206206

207207
[=Assert=]: No <a spec=webidl lt="an exception was thrown">exception was thrown</a>.
208+
209+
<div class=note>
210+
<p>Note: No exception can be thrown here because in the case where [=Subscriber/next
211+
algorithm=] is just a wrapper around a script-provided callback, the <a
212+
href=#process-observer>process observer</a> steps take care to wrap these callbacks in
213+
logic that, when invoking them, catches any exceptions, and reports them to the global.</p>
214+
215+
<p>When the [=Subscriber/next algorithm=] is a spec algorithm, those steps take care to not
216+
throw any exceptions outside of itself, to appease this assert.</p>
217+
</div>
208218
</div>
209219

210220
<div algorithm>
@@ -223,6 +233,8 @@ The <dfn attribute for=Subscriber><code>signal</code></dfn> getter steps are to
223233

224234
[=Assert=]: No <a spec=webidl lt="an exception was thrown">exception was thrown</a>.
225235

236+
Note: See the documentation in {{Subscriber/next()}} for details on why this is true.
237+
226238
1. Otherwise (i.e., when |error algorithm| is null), [=report the exception=] |error|.
227239
</div>
228240

@@ -241,6 +253,8 @@ The <dfn attribute for=Subscriber><code>signal</code></dfn> getter steps are to
241253
1. If |complete algorithm| is not null, then run |complete algorithm|.
242254

243255
[=Assert=]: No <a spec=webidl lt="an exception was thrown">exception was thrown</a>.
256+
257+
Note: See the documentation in {{Subscriber/next()}} for details on why this is true.
244258
</div>
245259

246260
<div algorithm>
@@ -451,7 +465,7 @@ An <dfn>internal observer</dfn> is a [=struct=] with the following [=struct/item
451465
1. Let |internal observer| be a new [=internal observer=].
452466

453467
1. Process |observer| as follows:
454-
<ol>
468+
<ol id=process-observer>
455469
<li>
456470
<dl class="switch">
457471
<dt>If |observer| is a {{SubscriptionObserverCallback}}</dt>

0 commit comments

Comments
 (0)