Skip to content

Commit

Permalink
stream: improve unimplemented _write() error
Browse files Browse the repository at this point in the history
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
ramisra authored and cjihrig committed Jul 21, 2016
1 parent 2cc01da commit 9983af0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9983af0

Please sign in to comment.