Skip to content

Commit 8946fc9

Browse files
author
Eric Wendelin
committed
Fix some old IE boogs
1 parent d1945db commit 8946fc9

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
BROWSERS=Firefox,ChromeCanary,Opera,Safari,PhantomJS
1+
BROWSERS=ChromeCanary
22

33
test:
44
@$(MAKE) lint
@@ -11,7 +11,7 @@ test-ci:
1111
$(MAKE) lint
1212
@echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
1313
@NODE_ENV=test ./node_modules/karma/bin/karma start karma.conf.ci.js --single-run && \
14-
cat ./coverage/Chrome*/lcov.info | ./node_modules/coveralls/bin/coveralls.js --verbose
14+
cat ./coverage/IE\ 7*/lcov.info | ./node_modules/coveralls/bin/coveralls.js --verbose
1515

1616
browser:
1717
open spec/spec-runner.html

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
error-stack-parser.js
22
===============
3+
[![Build Status](https://travis-ci.org/stacktracejs/error-stack-parser.svg?branch=master)](https://travis-ci.org/stacktracejs/error-stack-parser) [![Coverage Status](https://img.shields.io/coveralls/stacktracejs/error-stack-parser.svg)](https://coveralls.io/r/stacktracejs/error-stack-parser) [![Code Climate](https://codeclimate.com/github/stacktracejs/error-stack-parser/badges/gpa.svg)](https://codeclimate.com/github/stacktracejs/error-stack-parser)
34

45
Extract meaning from JS Errors
6+
7+
## Installation
8+
```
9+
npm install error-stack-parser
10+
bower install error-stack-parser
11+
component install error-stack-parser
12+
https://raw.githubusercontent.com/stacktracejs/error-stack-parser/master/error-stack-parser.js
13+
```

error-stack-parser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@
136136
};
137137

138138
this.parseV8OrIE = function parseV8OrIE(error) {
139-
return error.stack.split('\n').splice(1).map(function (line) {
140-
var tokens = line.split(/\s+/).splice(2);
139+
return error.stack.split('\n').slice(1).map(function (line) {
140+
var tokens = line.replace(/^\s+/, '').split(/\s+/).slice(1);
141141
var locationParts = this.extractLocation(tokens.pop().replace(/[\(\)\s]/g, ''));
142142
var functionName = (!tokens[0] || tokens[0] === 'Anonymous') ? undefined : tokens[0];
143143
return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2]);
@@ -191,7 +191,7 @@
191191
for (var i = 0, len = lines.length; i < len; i += 2) {
192192
var match = lineRE.exec(lines[i]);
193193
if (match) {
194-
result.push(new StackFrame(match[3], undefined, match[2], match[1]));
194+
result.push(new StackFrame(match[3] || undefined, undefined, match[2], match[1]));
195195
}
196196
}
197197

karma.conf.ci.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@ module.exports = function (config) {
1414
base: 'SauceLabs',
1515
browserName: 'firefox'
1616
},
17+
sl_opera: {
18+
base: 'SauceLabs',
19+
browserName: 'opera'
20+
},
1721
sl_ie_11: {
1822
base: 'SauceLabs',
1923
browserName: 'internet explorer',
2024
platform: 'Windows 8.1',
2125
version: '11'
2226
},
23-
sl_ie_9: {
27+
sl_ie_7: {
2428
base: 'SauceLabs',
2529
browserName: 'internet explorer',
26-
platform: 'Windows 7',
27-
version: '9'
30+
platform: 'Windows XP',
31+
version: '7'
2832
}
2933
};
3034

0 commit comments

Comments
 (0)