File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const JSStream = process.binding('js_stream').JSStream;
99var Buffer = require ( 'buffer' ) . Buffer ;
1010const uv = process . binding ( 'uv' ) ;
1111const debug = util . debuglog ( 'stream_wrap' ) ;
12+ const errors = require ( 'internal/errors' ) ;
1213
1314function StreamWrap ( stream ) {
1415 const handle = new JSStream ( ) ;
@@ -51,7 +52,7 @@ function StreamWrap(stream) {
5152 this . pause ( ) ;
5253 this . removeListener ( 'data' , ondata ) ;
5354
54- self . emit ( 'error' , new Error ( 'Stream has StringDecoder ' ) ) ;
55+ self . emit ( 'error' , new errors . Error ( 'ERR_STREAM_HAS_STRINGDECODER ' ) ) ;
5556 return ;
5657 }
5758
Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ E('ERR_PARSE_HISTORY_DATA',
158158E ( 'ERR_NO_CRYPTO' , 'Node.js is not compiled with OpenSSL crypto support' ) ;
159159E ( 'ERR_STDERR_CLOSE' , 'process.stderr cannot be closed' ) ;
160160E ( 'ERR_STDOUT_CLOSE' , 'process.stdout cannot be closed' ) ;
161+ E ( 'ERR_STREAM_HAS_STRINGDECODER' , 'Stream has StringDecoder' ) ;
161162E ( 'ERR_TRANSFORM_ALREADY_TRANSFORMING' ,
162163 'Calling transform done when still transforming' ) ;
163164E ( 'ERR_TRANSFORM_MULTIPLE_CALLBACK' , 'Callback called multiple times' ) ;
You can’t perform that action at this time.
0 commit comments