aboutsummaryrefslogtreecommitdiffstats
path: root/src/dstr-binding/error/try.template
blob: a7a83647cad1cf9352c94836fce9e10e852f314f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/try/dstr-
name: try statement
esid: sec-runtime-semantics-catchclauseevaluation
es6id: 13.15.7
features: [destructuring-binding]
info: |
    Catch : catch ( CatchParameter ) Block

    [...]
    5. Let status be the result of performing BindingInitialization for
       CatchParameter passing thrownValue and catchEnv as arguments.
    [...]
---*/

assert.throws(/*{ error }*/, function() {
  try {
    throw /*{ vals }*/;
  } catch (/*{ elems }*/) {}
});