Skip to content

Commit

Permalink
ff: Making error stacktrace parser more defensive. Fixes issue 8176
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Apr 3, 2015
1 parent d313aa3 commit 1ec882e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion javascript/firefox-driver/js/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,21 @@ fxdriver.error.toJSON = function(ex) {
}

match = frame.match(/^([\w./<$]+)?(?:\(.*\))?@(.+)?$/);
stackFrames.push({
if (match) {
stackFrames.push({
'methodName': match[1],
'fileName': match[2],
'lineNumber': lineNumber,
'columnNumber': columnNumber
});
} else {
stackFrames.push({
'methodName': frame,
'fileName': "?",
'lineNumber': "?",
'columnNumber': "?"
});
}
}
}

Expand Down

0 comments on commit 1ec882e

Please sign in to comment.