Commit 15102dffcde6c3ac322e4cc09aa0898065e86c8f
1 parent
dfe55a74
Exists in
master
and in
1 other branch
[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,6 +1154,13 @@ printStackTrace.implementation.prototype = { | ||
| 1154 | stacktrace[i] += '@unsupported.js'; | 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 | stacktrace[i] += ':0'; | 1164 | stacktrace[i] += ':0'; |
| 1158 | } | 1165 | } |
| 1159 | 1166 |