A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/stacktracejs/error-stack-parser/commit/409cdd78721b5287d840cc31b99ad7624da607ae below:

build dist · stacktracejs/error-stack-parser@409cdd7 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+9

-9

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+9

-9

lines changed Original file line number Diff line number Diff line change

@@ -56,21 +56,21 @@

56 56

return filtered.map(function(line) {

57 57

if (line.indexOf('(eval ') > -1) {

58 58

// Throw away eval information until we implement stacktrace.js/stackframe#8

59 -

line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, '');

59 +

line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(,.*$)/g, '');

60 60

}

61 -

var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');

61 +

var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(').replace(/^.*?\s+/, '');

62 62 63 63

// capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in

64 64

// case it has spaces in it, as the string is split on \s+ later on

65 -

var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);

65 +

var location = sanitizedLine.match(/ (\(.+\)$)/);

66 66 67 67

// remove the parenthesized location from the line, if it was matched

68 68

sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;

69 69 70 -

var tokens = sanitizedLine.split(/\s+/).slice(1);

71 -

// if a location was matched, pass it to extractLocation() otherwise pop the last token

72 -

var locationParts = this.extractLocation(location ? location[1] : tokens.pop());

73 -

var functionName = tokens.join(' ') || undefined;

70 +

// if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine

71 +

// because this line doesn't have function name

72 +

var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);

73 +

var functionName = location && sanitizedLine || undefined;

74 74

var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];

75 75 76 76

return new StackFrame({

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4