Skip to content

Commit ad0c28a

Browse files
author
Eric Wendelin
committed
Release version 0.2.4
1 parent 2a9b1e5 commit ad0c28a

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "error-stack-parser",
3-
"version": "0.2.3",
3+
"version": "0.2.4",
44
"main": "./error-stack-parser.js",
55
"homepage": "https://github.com/stacktracejs/error-stack-parser",
66
"authors": [

dist/error-stack-parser.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,19 @@
201201
// Opera 10.65+ Error.stack very similar to FF/Safari
202202
parseOpera11: function ErrorStackParser$$parseOpera11(error) {
203203
return error.stack.split('\n').filter(function (line) {
204-
return !!line.match(FIREFOX_SAFARI_STACK_REGEXP);
204+
return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&
205+
!line.match(/^Error created at/);
205206
}.bind(this)).map(function (line) {
206207
var tokens = line.split('@');
207208
var locationParts = this.extractLocation(tokens.pop());
208209
var functionCall = (tokens.shift() || '');
209-
var functionName = functionCall.replace(/<anonymous function: (\w+)>/, '$1').replace(/\([^\)]*\)/, '') || undefined;
210-
var argsRaw = functionCall.replace(/^[^\(]+\(([^\)]*)\)$/, '$1') || undefined;
210+
var functionName = functionCall
211+
.replace(/<anonymous function(: (\w+))?>/, '$2')
212+
.replace(/\([^\)]*\)/g, '') || undefined;
213+
var argsRaw;
214+
if (functionCall.match(/\(([^\)]*)\)/)) {
215+
argsRaw = functionCall.replace(/^[^\(]+\(([^\)]*)\)$/, '$1');
216+
}
211217
var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ? undefined : argsRaw.split(',');
212218
return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2]);
213219
}.bind(this));

dist/error-stack-parser.js.map

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)