diff --git a/front/src/js/directives/offendersDirectives.js b/front/src/js/directives/offendersDirectives.js
index d122393..3ed389a 100644
--- a/front/src/js/directives/offendersDirectives.js
+++ b/front/src/js/directives/offendersDirectives.js
@@ -608,7 +608,12 @@
for (var i = 0 ; i < parsedBacktrace.length ; i++) {
html += '
';
html += '
' + (parsedBacktrace[i].fnName || '(anonymous function)') + '
';
- html += '
' + getUrlLink(parsedBacktrace[i].filePath, 40) + ':' + parsedBacktrace[i].line + '
';
+ html += '
' + getUrlLink(parsedBacktrace[i].filePath, 40) + '
';
+ if (parsedBacktrace[i].column) {
+ html += '
' + parsedBacktrace[i].line + ':' + parsedBacktrace[i].column + '
';
+ } else {
+ html += '
line ' + parsedBacktrace[i].line + '
';
+ }
html += '
';
}
}
@@ -630,6 +635,17 @@
var fnName = null, fileAndLine;
var withFnResult = /^([^\s\(]+) \((.+:\d+)\)$/.exec(trace);
+
+ if (withFnResult === null) {
+ // Try the PhantomJS 2 format
+ withFnResult = /^([^\s\(]+) \((.+:\d+:\d+)\)$/.exec(trace);
+ }
+
+ if (withFnResult === null) {
+ // Try the PhantomJS 2 ERROR format
+ withFnResult = /^([^\s\(]+) (http.+:\d+)$/.exec(trace);
+ }
+
if (withFnResult === null) {
fileAndLine = trace;
} else {
@@ -637,14 +653,22 @@
fileAndLine = withFnResult[2];
}
- var fileAndLineSplit = /^(.*):(\d+)$/.exec(fileAndLine);
+ // And now the second part
+ var fileAndLineSplit = /^(.*):(\d+):(\d+)$/.exec(fileAndLine);
+
+ if (fileAndLineSplit === null) {
+ fileAndLineSplit = /^(.*):(\d+)$/.exec(fileAndLine);
+ }
+
var filePath = fileAndLineSplit[1];
var line = fileAndLineSplit[2];
+ var column = fileAndLineSplit[3];
out.push({
fnName: fnName,
filePath: filePath,
- line: line
+ line: line,
+ column: column
});
});