Skip to content

Commit

Permalink
[fix] Don't ignore exceptions thrown by data handler
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Nov 24, 2012
1 parent 209598f commit 37e26f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/json-stream.js
Expand Up @@ -27,9 +27,12 @@ JSONStream.prototype.write = function (data) {

lines.forEach(function(line) {
try {
that.emit('data', JSON.parse(line));
line = JSON.parse(line);
}
catch (_) { }
catch (_) {
return;
}
that.emit('data', line);
});

return !this.paused;
Expand Down

0 comments on commit 37e26f2

Please sign in to comment.