From add34ccc9d899bc23faf6a6e1dc19bb6528e9045 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 17 Oct 2011 03:16:44 -0500 Subject: [PATCH] string errors again --- lib/encoded.js | 2 +- lib/json.js | 2 +- lib/parted.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/encoded.js b/lib/encoded.js index d61c00f..a91b47b 100644 --- a/lib/encoded.js +++ b/lib/encoded.js @@ -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); }; diff --git a/lib/json.js b/lib/json.js index 76a923c..439a99c 100644 --- a/lib/json.js +++ b/lib/json.js @@ -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); }; diff --git a/lib/parted.js b/lib/parted.js index 1cd9816..4210db7 100644 --- a/lib/parted.js +++ b/lib/parted.js @@ -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); };