Skip to content

Commit

Permalink
Merge pull request #671 from klacointe/sprocket_stacktrace
Browse files Browse the repository at this point in the history
[Notifier JS] Extract sprocket stacktraces.
  • Loading branch information
shingara committed Mar 24, 2014
2 parents dfe55a7 + 15102df commit f3689b3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions public/javascripts/notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,13 @@ printStackTrace.implementation.prototype = {
stacktrace[i] += '@unsupported.js';
}

// Special case for sprocket coffee stacktrace:
// "Function.foo (http://host/file.js?body=1:666:42)" becomes "Function.foo @http://host/file.js?body=1:666"
if (stacktrace[i].match(/\([^\s]+:(\d+):(\d+)\)$/)) {
stacktrace[i] = stacktrace[i].replace(/\((.+):(\d+):(\d+)\)$/, '@$1:$2')
continue;
}

stacktrace[i] += ':0';
}

Expand Down

0 comments on commit f3689b3

Please sign in to comment.