Skip to content

Commit 5c84ed6

Browse files
committed
[js-api] Throw RangeError when getArg's index is out of bounds
Closes WebAssembly#184.
1 parent 76419ef commit 5c84ed6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

document/js-api/index.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ The <dfn method for="Exception">getArg(|exceptionTag|, |index|)</dfn> method ste
12931293
1. Throw a {{TypeError}}.
12941294
1. Let |payload| be **this**.\[[Payload]].
12951295
1. If |index| ≥ |payload|'s [=list/size=],
1296-
1. Throw a {{TypeError}}.
1296+
1. Throw a {{RangeError}}.
12971297
1. Return [=ToJSValue=](|payload|[|index|]).
12981298

12991299
</div>

0 commit comments

Comments
 (0)