From 695871b2ac7e99e9e1ee89d6cc532b73513eaef3 Mon Sep 17 00:00:00 2001 From: "Italo A. Casas" Date: Mon, 26 Sep 2016 23:51:19 -0400 Subject: [PATCH 1/4] stream: improving msg when tranform._transform() method is not implemented --- lib/_stream_transform.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js index 5dc7fdd0a8d831..93382530bb3d57 100644 --- a/lib/_stream_transform.js +++ b/lib/_stream_transform.js @@ -139,7 +139,7 @@ Transform.prototype.push = function(chunk, encoding) { // an error, then that'll put the hurt on the whole operation. If you // never call cb(), then you'll never get another chunk. Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('Not implemented'); + throw new Error('_transform() method is not implemented'); }; Transform.prototype._write = function(chunk, encoding, cb) { From 2031aa23539be8f4833e60802632967d954bc5b8 Mon Sep 17 00:00:00 2001 From: "Italo A. Casas" Date: Tue, 27 Sep 2016 09:07:45 -0400 Subject: [PATCH 2/4] stream: improving err msg when Readable._read() is not implemented --- lib/_stream_readable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 65efdc4992fcef..5b9087a8737581 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -467,7 +467,7 @@ function maybeReadMore_(stream, state) { // for virtual (non-string, non-buffer) streams, "length" is somewhat // arbitrary, and perhaps not very meaningful. Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); + this.emit('error', new Error('_read() is not implemented')); }; Readable.prototype.pipe = function(dest, pipeOpts) { From 3b61f6526f4df6476b99bf1f4bf808c8449545ee Mon Sep 17 00:00:00 2001 From: "Italo A. Casas" Date: Tue, 27 Sep 2016 09:10:08 -0400 Subject: [PATCH 3/4] stream: removing extra word in err msg when Writable._write() when not implemented --- lib/_stream_writable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index 88c19cddbfa490..7a728c9de2c8aa 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -432,7 +432,7 @@ function clearBuffer(stream, state) { } Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('_write() method is not implemented')); + cb(new Error('_write() is not implemented')); }; Writable.prototype._writev = null; From e6c77b263bf85bc07f62bdd711e0fdc640c6eee1 Mon Sep 17 00:00:00 2001 From: "Italo A. Casas" Date: Tue, 27 Sep 2016 09:14:51 -0400 Subject: [PATCH 4/4] stream: removing extra word in err msg when Transform._transform() when not implemented --- lib/_stream_transform.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js index 93382530bb3d57..259774c45c7335 100644 --- a/lib/_stream_transform.js +++ b/lib/_stream_transform.js @@ -139,7 +139,7 @@ Transform.prototype.push = function(chunk, encoding) { // an error, then that'll put the hurt on the whole operation. If you // never call cb(), then you'll never get another chunk. Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('_transform() method is not implemented'); + throw new Error('_transform() is not implemented'); }; Transform.prototype._write = function(chunk, encoding, cb) {