Commit f3689b350af7d77f66e6582833e6273c12ed35b9
Exists in
master
and in
1 other branch
Merge pull request #671 from klacointe/sprocket_stacktrace
[Notifier JS] Extract sprocket stacktraces.
Showing
1 changed file
with
7 additions
and
0 deletions
Show diff stats
public/javascripts/notifier.js
... | ... | @@ -1154,6 +1154,13 @@ printStackTrace.implementation.prototype = { |
1154 | 1154 | stacktrace[i] += '@unsupported.js'; |
1155 | 1155 | } |
1156 | 1156 | |
1157 | + // Special case for sprocket coffee stacktrace: | |
1158 | + // "Function.foo (http://host/file.js?body=1:666:42)" becomes "Function.foo @http://host/file.js?body=1:666" | |
1159 | + if (stacktrace[i].match(/\([^\s]+:(\d+):(\d+)\)$/)) { | |
1160 | + stacktrace[i] = stacktrace[i].replace(/\((.+):(\d+):(\d+)\)$/, '@$1:$2') | |
1161 | + continue; | |
1162 | + } | |
1163 | + | |
1157 | 1164 | stacktrace[i] += ':0'; |
1158 | 1165 | } |
1159 | 1166 | ... | ... |