From 9983af03470a89cc925781279be40898efae3f31 Mon Sep 17 00:00:00 2001 From: ratikesh9 Date: Tue, 12 Jul 2016 23:17:28 +0545 Subject: [PATCH] stream: improve unimplemented _write() error This commit improves the ambiguous "not implemented" error that is provided when a writable stream does not implement _write(). Fixes: https://github.com/nodejs/node/issues/7396 PR-URL: https://github.com/nodejs/node/pull/7671 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- 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 76c4972d40..88c19cddbf 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('not implemented')); + cb(new Error('_write() method is not implemented')); }; Writable.prototype._writev = null;