Skip to content

Commit b602202

Browse files
committed
Update dist
1 parent e239167 commit b602202

File tree

3 files changed

+40
-27
lines changed

3 files changed

+40
-27
lines changed

dist/error-stack-parser.js

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@
102102
var functionName = tokens.join(' ') || undefined;
103103
var fileName = _indexOf(['eval', '<anonymous>'], locationParts[0]) > -1 ? undefined : locationParts[0];
104104

105-
return new StackFrame(functionName, undefined, fileName, locationParts[1], locationParts[2], line);
105+
return new StackFrame({
106+
functionName: functionName,
107+
fileName: fileName,
108+
lineNumber: locationParts[1],
109+
columnNumber: locationParts[2],
110+
source: line
111+
});
106112
}, this);
107113
},
108114

@@ -119,17 +125,21 @@
119125

120126
if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {
121127
// Safari eval frames only have function names and nothing else
122-
return new StackFrame(line);
128+
return new StackFrame({
129+
functionName: line
130+
});
123131
} else {
124132
var tokens = line.split('@');
125133
var locationParts = this.extractLocation(tokens.pop());
126134
var functionName = tokens.join('@') || undefined;
127-
return new StackFrame(functionName,
128-
undefined,
129-
locationParts[0],
130-
locationParts[1],
131-
locationParts[2],
132-
line);
135+
136+
return new StackFrame({
137+
functionName: functionName,
138+
fileName: locationParts[0],
139+
lineNumber: locationParts[1],
140+
columnNumber: locationParts[2],
141+
source: line
142+
});
133143
}
134144
}, this);
135145
},
@@ -153,7 +163,11 @@
153163
for (var i = 2, len = lines.length; i < len; i += 2) {
154164
var match = lineRE.exec(lines[i]);
155165
if (match) {
156-
result.push(new StackFrame(undefined, undefined, match[2], match[1], undefined, lines[i]));
166+
result.push(new StackFrame({
167+
fileName: match[2],
168+
lineNumber: match[1],
169+
source: lines[i]
170+
}));
157171
}
158172
}
159173

@@ -169,14 +183,12 @@
169183
var match = lineRE.exec(lines[i]);
170184
if (match) {
171185
result.push(
172-
new StackFrame(
173-
match[3] || undefined,
174-
undefined,
175-
match[2],
176-
match[1],
177-
undefined,
178-
lines[i]
179-
)
186+
new StackFrame({
187+
functionName: match[3] || undefined,
188+
fileName: match[2],
189+
lineNumber: match[1],
190+
source: lines[i]
191+
})
180192
);
181193
}
182194
}
@@ -203,15 +215,16 @@
203215
}
204216
var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?
205217
undefined : argsRaw.split(',');
206-
return new StackFrame(
207-
functionName,
208-
args,
209-
locationParts[0],
210-
locationParts[1],
211-
locationParts[2],
212-
line);
218+
219+
return new StackFrame({
220+
functionName: functionName,
221+
args: args,
222+
fileName: locationParts[0],
223+
lineNumber: locationParts[1],
224+
columnNumber: locationParts[2],
225+
source: line
226+
});
213227
}, this);
214228
}
215229
};
216230
}));
217-

dist/error-stack-parser.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)