test/script/basic/NASHORN-109.js

Print this page

        

*** 31,42 **** try { if (typeof foo == 'undefined') { throw new Error("error"); } } catch (e) { ! for (i in e.stack) { ! print(e.stack[i].methodName + ' ' + e.stack[i].lineNumber); } } // just some code at the end.. original test involved // line numer of the last line always. Just to check the same.. --- 31,43 ---- try { if (typeof foo == 'undefined') { throw new Error("error"); } } catch (e) { ! var frames = e.getStackTrace(); ! for (i in frames) { ! print(frames[i].methodName + ' ' + frames[i].lineNumber); } } // just some code at the end.. original test involved // line numer of the last line always. Just to check the same..