Skip to content

Commit

Permalink
string errors again
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Oct 17, 2011
1 parent d1962be commit add34cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/encoded.js
Expand Up @@ -111,7 +111,7 @@ Parser.prototype._write = function(data) {
Parser.prototype._error = function(err) {
this.destroy();
this.emit('error', typeof err === 'string'
? new Error(err + '')
? new Error(err)
: err);
};

Expand Down
2 changes: 1 addition & 1 deletion lib/json.js
Expand Up @@ -378,7 +378,7 @@ Parser.prototype._reset = function() {
Parser.prototype._error = function(err) {
this.destroy();
this.emit('error', typeof err === 'string'
? new Error(err + '')
? new Error(err)
: err);
};

Expand Down
2 changes: 1 addition & 1 deletion lib/parted.js
Expand Up @@ -299,7 +299,7 @@ Parser.prototype._reset = function() {
Parser.prototype._error = function(err) {
this.destroy();
this.emit('error', typeof err === 'string'
? new Error(err + '')
? new Error(err)
: err);
};

Expand Down

0 comments on commit add34cc

Please sign in to comment.