Skip to content

Commit 73c3b0a

Browse files
committed
port error that appeared after rebase
1 parent 9b6956e commit 73c3b0a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/_stream_writable.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const {
3838
ERR_INVALID_ARG_TYPE,
3939
ERR_METHOD_NOT_IMPLEMENTED,
4040
ERR_STREAM_CANNOT_PIPE,
41+
ERR_STREAM_DESTROYED,
4142
ERR_STREAM_NULL_VALUES,
4243
ERR_STREAM_WRITE_AFTER_END,
4344
ERR_UNKNOWN_ENCODING
@@ -400,7 +401,7 @@ function doWrite(stream, state, writev, len, chunk, encoding, cb) {
400401
state.writing = true;
401402
state.sync = true;
402403
if (state.destroyed)
403-
state.onwrite(new errors.Error('ERR_STREAM_DESTROYED', 'write'));
404+
state.onwrite(new ERR_STREAM_DESTROYED('write'));
404405
else if (writev)
405406
stream._writev(chunk, state.onwrite);
406407
else

lib/internal/errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ E('ERR_SOCKET_DGRAM_NOT_RUNNING', 'Not running', Error);
846846
E('ERR_STDERR_CLOSE', 'process.stderr cannot be closed', Error);
847847
E('ERR_STDOUT_CLOSE', 'process.stdout cannot be closed', Error);
848848
E('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable', Error);
849-
E('ERR_STREAM_DESTROYED', 'Cannot call %s after a stream was destroyed');
849+
E('ERR_STREAM_DESTROYED', 'Cannot call %s after a stream was destroyed', Error);
850850
E('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
851851
E('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF', Error);
852852
E('ERR_STREAM_READ_NOT_IMPLEMENTED', '_read() is not implemented', Error);

0 commit comments

Comments
 (0)