Skip to content

Commit 38a0716

Browse files
committed
Removes obfuscating error handling when emitting messages
Fixes #19, which has a longer discussion about the issue itself. Again, I totally understand if there's some use case that I'm missing that this PR would mess with.
1 parent 8b98500 commit 38a0716

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,7 @@ PythonShell.prototype.receive = function (data) {
212212
this._remaining = lastLine;
213213

214214
parts.forEach(function (part) {
215-
try {
216-
self.emit('message', self.parser(part));
217-
} catch(err) {
218-
self.emit('error', extend(
219-
new Error('invalid message: ' + data + ' >> ' + err),
220-
{ inner: err, data: part}
221-
));
222-
}
215+
self.emit('message', self.parser(part));
223216
});
224217

225218
return this;

0 commit comments

Comments
 (0)