test/script/basic/NASHORN-109.js

changeset 378
39e17373d8df
parent 7
5a1b0714df0e
child 952
6d5471a497fb
child 962
ac62e33a99b0
equal deleted inserted replaced
377:26a345c26e62 378:39e17373d8df
31 try { 31 try {
32 if (typeof foo == 'undefined') { 32 if (typeof foo == 'undefined') {
33 throw new Error("error"); 33 throw new Error("error");
34 } 34 }
35 } catch (e) { 35 } catch (e) {
36 for (i in e.stack) { 36 var frames = e.getStackTrace();
37 print(e.stack[i].methodName + ' ' + e.stack[i].lineNumber); 37 for (i in frames) {
38 print(frames[i].methodName + ' ' + frames[i].lineNumber);
38 } 39 }
39 } 40 }
40 41
41 // just some code at the end.. original test involved 42 // just some code at the end.. original test involved
42 // line numer of the last line always. Just to check the same.. 43 // line numer of the last line always. Just to check the same..

mercurial