We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 611fc48 commit d197b82Copy full SHA for d197b82
javascript/firefox-driver/js/error.js
@@ -38,11 +38,15 @@ fxdriver.error.toJSON = function(ex) {
38
39
for (var frame = stack.shift(); frame; frame = stack.shift()) {
40
var match = frame.match(/^([a-zA-Z_$][\w./<]*)?(?:\(.*\))?@(.+)?:(\d*)$/);
41
- stackFrames.push({
42
- 'methodName': match[1],
43
- 'fileName': match[2],
44
- 'lineNumber': Number(match[3])
45
- });
+ if (match) {
+ stackFrames.push({
+ 'methodName': match[1],
+ 'fileName': match[2],
+ 'lineNumber': Number(match[3])
46
+ });
47
+ } else {
48
+ stackFrames.push({'methodName': frame});
49
+ }
50
}
51
52
0 commit comments