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 <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
2cc01da7f0
commit
9983af0347
@ -432,7 +432,7 @@ function clearBuffer(stream, state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Writable.prototype._write = function(chunk, encoding, cb) {
|
Writable.prototype._write = function(chunk, encoding, cb) {
|
||||||
cb(new Error('not implemented'));
|
cb(new Error('_write() method is not implemented'));
|
||||||
};
|
};
|
||||||
|
|
||||||
Writable.prototype._writev = null;
|
Writable.prototype._writev = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user