diff --git a/front/src/js/directives/offendersDirectives.js b/front/src/js/directives/offendersDirectives.js index 3ed389a..ae84679 100644 --- a/front/src/js/directives/offendersDirectives.js +++ b/front/src/js/directives/offendersDirectives.js @@ -641,6 +641,11 @@ withFnResult = /^([^\s\(]+) \((.+:\d+:\d+)\)$/.exec(trace); } + if (withFnResult === null) { + // Yet another PhantomJS 2 format? + withFnResult = /^([^\s\(]+|global code)@(.+:\d+:\d+)$/.exec(trace); + } + if (withFnResult === null) { // Try the PhantomJS 2 ERROR format withFnResult = /^([^\s\(]+) (http.+:\d+)$/.exec(trace); @@ -664,12 +669,15 @@ var line = fileAndLineSplit[2]; var column = fileAndLineSplit[3]; - out.push({ - fnName: fnName, - filePath: filePath, - line: line, - column: column - }); + // Filter phantomas code + if (filePath.indexOf('phantomjs://') === -1) { + out.push({ + fnName: fnName, + filePath: filePath, + line: line, + column: column + }); + } }); } catch(e) { diff --git a/lib/offendersHelpers.js b/lib/offendersHelpers.js index 69e7b1b..3fe906a 100644 --- a/lib/offendersHelpers.js +++ b/lib/offendersHelpers.js @@ -113,14 +113,17 @@ var OffendersHelpers = function() { if (traceArray) { var results = []; var parts = null; + var obj; for (var i=0 ; i