Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 5604392

Browse files
committed
fixup! [js-api] Add support for exceptions.
1 parent ba6b577 commit 5604392

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

document/js-api/index.bs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,8 @@ interface Exception {
11851185
An {{Exception}} value represents a type of exception.
11861186
{{Exception}} values have an <dfn for=Exception>exception tag</dfn>.
11871187

1188-
The <dfn for=Exception>payload types</dfn> of an {{Exception}} is the [=list=] of types of
1188+
The <dfn for=Exception>payload types</dfn> of an {{Exception}} is the [=list=] of types associated
1189+
with its [=Exception/exception tag=].
11891190

11901191

11911192
<h4 id="runtime-exceptions">Runtime exceptions</h4>
@@ -1202,15 +1203,13 @@ A {{RuntimeException}} value represents an [=exnref=] value.
12021203
{{RuntimeException}} values have an <dfn for=RuntimeException>internal exception</dfn>, which
12031204
is an [=event address=].
12041205

1205-
Issue: Should it be possible to construct {{RuntimeException}} objects from JavaScript? Only with
1206-
the [=JavaScript exception tag=] or also with others? How?
12071206
<div algorithm>
12081207

12091208
The <dfn constructor for=RuntimeException
12101209
lt="RuntimeException(exceptionType, payload)">new RuntimeException(|exceptionType|, |payload|)</dfn>
12111210
constructor steps are:
12121211

1213-
1. Let |types| be |exceptionType|'s [=Exception/exception tag=]'s [=list=] of types.
1212+
1. Let |types| be |exceptionType|'s [=Exception/payload types=].
12141213
1. If |types|'s [=list/size=] is not |payload|'s [=list/size=],
12151214
1. Throw a {{TypeError}}.
12161215
1. Let |wasmPayload| be « ».

0 commit comments

Comments
 (0)