From 5604392b448fd07f272f4416b4a22d66767f13c1 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 5 Jun 2020 16:19:27 +0200 Subject: [PATCH] fixup! [js-api] Add support for exceptions. --- document/js-api/index.bs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index c27a66b9..185daea4 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -1185,7 +1185,8 @@ interface Exception { An {{Exception}} value represents a type of exception. {{Exception}} values have an exception tag. -The payload types of an {{Exception}} is the [=list=] of types of +The payload types of an {{Exception}} is the [=list=] of types associated +with its [=Exception/exception tag=].

Runtime exceptions

@@ -1202,15 +1203,13 @@ A {{RuntimeException}} value represents an [=exnref=] value. {{RuntimeException}} values have an internal exception, which is an [=event address=]. -Issue: Should it be possible to construct {{RuntimeException}} objects from JavaScript? Only with -the [=JavaScript exception tag=] or also with others? How?
The new RuntimeException(|exceptionType|, |payload|) constructor steps are: -1. Let |types| be |exceptionType|'s [=Exception/exception tag=]'s [=list=] of types. +1. Let |types| be |exceptionType|'s [=Exception/payload types=]. 1. If |types|'s [=list/size=] is not |payload|'s [=list/size=], 1. Throw a {{TypeError}}. 1. Let |wasmPayload| be « ».