|
@ -28,13 +28,14 @@ function errnoException(errorno, syscall) { |
|
|
// TODO make this more compatible with ErrnoException from src/node.cc
|
|
|
// TODO make this more compatible with ErrnoException from src/node.cc
|
|
|
// Once all of Node is using this function the ErrnoException from
|
|
|
// Once all of Node is using this function the ErrnoException from
|
|
|
// src/node.cc should be removed.
|
|
|
// src/node.cc should be removed.
|
|
|
var e = new Error(syscall + ' ' + errorno); |
|
|
|
|
|
|
|
|
|
|
|
// For backwards compatibility. libuv returns ENOENT on NXDOMAIN.
|
|
|
// For backwards compatibility. libuv returns ENOENT on NXDOMAIN.
|
|
|
if (errorno == 'ENOENT') { |
|
|
if (errorno == 'ENOENT') { |
|
|
errorno = 'ENOTFOUND'; |
|
|
errorno = 'ENOTFOUND'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var e = new Error(syscall + ' ' + errorno); |
|
|
|
|
|
|
|
|
e.errno = e.code = errorno; |
|
|
e.errno = e.code = errorno; |
|
|
e.syscall = syscall; |
|
|
e.syscall = syscall; |
|
|
return e; |
|
|
return e; |
|
|