Permalink
Browse files

errors,stream_wrap: use internal/errors.js

PR-URL: #13291
Refs: #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>
  • Loading branch information...
LakshmiSwethaG authored and tniessen committed Jun 5, 2017
1 parent 275d0b3 commit d2913384aaeaf08fddb52e25e01f84c62e96e240
Showing with 3 additions and 1 deletion.
  1. +2 −1 lib/_stream_wrap.js
  2. +1 −0 lib/internal/errors.js
View
@@ -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;
}
View
@@ -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');

0 comments on commit d291338

Please sign in to comment.