Permalink
Browse files

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: #7396
PR-URL: #7671
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
ratikesh9 authored and cjihrig committed Jul 12, 2016
1 parent 2cc01da commit 9983af03470a89cc925781279be40898efae3f31
Showing with 1 addition and 1 deletion.
  1. +1 −1 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;

0 comments on commit 9983af0

Please sign in to comment.