Skip to content

Commit d3e81c1

Browse files
timfishkamilogorek
authored andcommitted
fix: Update stack-trace to handle spaces in paths (#437)
1 parent ea19288 commit d3e81c1

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"dependencies": {
3333
"cookie": "0.3.1",
3434
"md5": "^2.2.1",
35-
"stack-trace": "0.0.9",
35+
"stack-trace": "0.0.10",
3636
"timed-out": "4.0.1",
3737
"uuid": "3.0.0"
3838
},
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = function() {
2+
throw new Error('boom');
3+
};

test/raven.utils.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,21 @@ describe('raven.utils', function() {
280280
raven.utils.parseStack(e, parseCallback);
281281
}
282282
});
283+
284+
it('should handle spaces in paths', function(done) {
285+
var parseStack = raven.utils.parseStack;
286+
var callback = function(frames) {
287+
var frame = frames.pop();
288+
frame.module.should.endWith('file with spaces in path');
289+
frame.filename.should.endWith('file with spaces in path.js');
290+
done();
291+
};
292+
try {
293+
require('./fixtures/file with spaces in path')();
294+
} catch (e) {
295+
parseStack(e, callback);
296+
}
297+
});
283298
});
284299

285300
describe('#getCulprit()', function() {

0 commit comments

Comments
 (0)