Skip to content

Commit 9983af0

Browse files
ramisracjihrig
authored andcommitted
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 2cc01da commit 9983af0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/_stream_writable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ function clearBuffer(stream, state) {
432432
}
433433

434434
Writable.prototype._write = function(chunk, encoding, cb) {
435-
cb(new Error('not implemented'));
435+
cb(new Error('_write() method is not implemented'));
436436
};
437437

438438
Writable.prototype._writev = null;

0 commit comments

Comments
 (0)