errors,stream_wrap: use internal/errors.js
PR-URL: https://github.com/nodejs/node/pull/13291 Refs: https://github.com/nodejs/node/issues/11273 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
parent
275d0b30a0
commit
d2913384aa
@ -9,6 +9,7 @@ const JSStream = process.binding('js_stream').JSStream;
|
||||
var Buffer = require('buffer').Buffer;
|
||||
const uv = process.binding('uv');
|
||||
const debug = util.debuglog('stream_wrap');
|
||||
const errors = require('internal/errors');
|
||||
|
||||
function StreamWrap(stream) {
|
||||
const handle = new JSStream();
|
||||
@ -51,7 +52,7 @@ function StreamWrap(stream) {
|
||||
this.pause();
|
||||
this.removeListener('data', ondata);
|
||||
|
||||
self.emit('error', new Error('Stream has StringDecoder'));
|
||||
self.emit('error', new errors.Error('ERR_STREAM_HAS_STRINGDECODER'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -158,6 +158,7 @@ E('ERR_PARSE_HISTORY_DATA',
|
||||
E('ERR_NO_CRYPTO', 'Node.js is not compiled with OpenSSL crypto support');
|
||||
E('ERR_STDERR_CLOSE', 'process.stderr cannot be closed');
|
||||
E('ERR_STDOUT_CLOSE', 'process.stdout cannot be closed');
|
||||
E('ERR_STREAM_HAS_STRINGDECODER', 'Stream has StringDecoder');
|
||||
E('ERR_TRANSFORM_ALREADY_TRANSFORMING',
|
||||
'Calling transform done when still transforming');
|
||||
E('ERR_TRANSFORM_MULTIPLE_CALLBACK', 'Callback called multiple times');
|
||||
|
Loading…
x
Reference in New Issue
Block a user