test/script/basic/NASHORN-837.js

changeset 144
4be452026847
parent 13
d8e4d66f1a06
child 952
6d5471a497fb
child 962
ac62e33a99b0
equal deleted inserted replaced
143:606a1946e3e2 144:4be452026847
26 * 26 *
27 * @test 27 * @test
28 * @run 28 * @run
29 */ 29 */
30 30
31 var failed = false;
32
33 try { 31 try {
34 try { 32 throw new TypeError('error');
35 throw new TypeError('error'); 33 } catch (iox) {
36 } catch (iox) { 34 var f = function() {
37 function f() { 35 if(iox.message != 'error') {
38 print(iox.message); 36 print("Failure! iox did not throw correct exception");
39 } 37 }
40 } 38 }
41 f();
42 } catch (e) {
43 failed = (e instanceof ReferenceError);
44 //iox not defined should be thrown
45 } 39 }
46 40 f();
47 if (!failed) {
48 print("Failure! iox did not throw correct exception");
49 }
50

mercurial