Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/values/exception-during-enumeration.js

raw
1 // Copyright (C) 2015 Jordan Harband. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-object.values
6 description: Object.values should terminate if getting a value throws an exception
7 author: Jordan Harband
8 ---*/
9
10 var trappedKey = {
11 get a() {
12 throw new RangeError('This error should be re-thrown');
13 },
14 get b() {
15 $ERROR('Should not try to get the second element');
16 }
17 };
18
19 assert.throws(RangeError, function() {
20 Object.values(trappedKey);
21 });