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.. |