main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
354 bytes
|
Rev | Line | |
---|
[d565449] | 1 | module.exports = function () {
|
---|
| 2 | // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
|
---|
| 3 | var origPrepareStackTrace = Error.prepareStackTrace;
|
---|
| 4 | Error.prepareStackTrace = function (_, stack) { return stack; };
|
---|
| 5 | var stack = (new Error()).stack;
|
---|
| 6 | Error.prepareStackTrace = origPrepareStackTrace;
|
---|
| 7 | return stack[2].getFileName();
|
---|
| 8 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.