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 @@ -28,13 +28,14 @@ function errnoException(errorno, syscall) {
2828 // TODO make this more compatible with ErrnoException from src/node.cc
2929 // Once all of Node is using this function the ErrnoException from
3030 // src/node.cc should be removed.
31- var e = new Error ( syscall + ' ' + errorno ) ;
3231
3332 // For backwards compatibility. libuv returns ENOENT on NXDOMAIN.
3433 if ( errorno == 'ENOENT' ) {
3534 errorno = 'ENOTFOUND' ;
3635 }
3736
37+ var e = new Error ( syscall + ' ' + errorno ) ;
38+
3839 e . errno = e . code = errorno ;
3940 e . syscall = syscall ;
4041 return e ;
Original file line number Diff line number Diff line change @@ -308,6 +308,7 @@ TEST(function test_lookup_failure(done) {
308308 assert . ok ( err instanceof Error ) ;
309309 assert . strictEqual ( err . errno , dns . NOTFOUND ) ;
310310 assert . strictEqual ( err . errno , 'ENOTFOUND' ) ;
311+ assert . ok ( ! / E N O E N T / . test ( err . message ) ) ;
311312
312313 done ( ) ;
313314 } ) ;
You can’t perform that action at this time.
0 commit comments