File tree 2 files changed +3
-1
lines changed
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;
9
9
var Buffer = require ( 'buffer' ) . Buffer ;
10
10
const uv = process . binding ( 'uv' ) ;
11
11
const debug = util . debuglog ( 'stream_wrap' ) ;
12
+ const errors = require ( 'internal/errors' ) ;
12
13
13
14
function StreamWrap ( stream ) {
14
15
const handle = new JSStream ( ) ;
@@ -51,7 +52,7 @@ function StreamWrap(stream) {
51
52
this . pause ( ) ;
52
53
this . removeListener ( 'data' , ondata ) ;
53
54
54
- self . emit ( 'error' , new Error ( 'Stream has StringDecoder ' ) ) ;
55
+ self . emit ( 'error' , new errors . Error ( 'ERR_STREAM_HAS_STRINGDECODER ' ) ) ;
55
56
return ;
56
57
}
57
58
Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ E('ERR_PARSE_HISTORY_DATA',
158
158
E ( 'ERR_NO_CRYPTO' , 'Node.js is not compiled with OpenSSL crypto support' ) ;
159
159
E ( 'ERR_STDERR_CLOSE' , 'process.stderr cannot be closed' ) ;
160
160
E ( 'ERR_STDOUT_CLOSE' , 'process.stdout cannot be closed' ) ;
161
+ E ( 'ERR_STREAM_HAS_STRINGDECODER' , 'Stream has StringDecoder' ) ;
161
162
E ( 'ERR_TRANSFORM_ALREADY_TRANSFORMING' ,
162
163
'Calling transform done when still transforming' ) ;
163
164
E ( 'ERR_TRANSFORM_MULTIPLE_CALLBACK' , 'Callback called multiple times' ) ;
You can’t perform that action at this time.
0 commit comments