Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getTrace() {
- try {
- throw new Error;
- }
- catch (ex) {
- var matches = [];
- ex.stack.replace(/([^\s]+):(\d+):(\d+)/g, function(all, file, line, column) {
- file = file.replace(/^[\s\(]/g, '');
- matches.push({"file": file, "line": line, "column": column});
- });
- matches.shift(); // Remove this function
- return matches;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement