Skip to content

Commit fe0b8d9

Browse files
committed
src: remove uv errno
This commit attempts to take care of a TODO reported in issue 4641. I'm not sure if just removing errno is an option, as there might be code that is depending on this errno being availble. If it cannot be removed perhaps the TODO can. Hopefully feedback on this commit will sort that out. Refs: nodejs#4641
1 parent f3f9dd7 commit fe0b8d9

File tree

3 files changed

+0
-6
lines changed

3 files changed

+0
-6
lines changed

src/node.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -940,9 +940,6 @@ Local<Value> UVException(Isolate* isolate,
940940

941941
Local<Object> e = Exception::Error(js_msg)->ToObject(isolate);
942942

943-
// TODO(piscisaureus) errno should probably go; the user has no way of
944-
// knowing which uv errno value maps to which error.
945-
e->Set(env->errno_string(), Integer::New(isolate, errorno));
946943
e->Set(env->code_string(), js_code);
947944
e->Set(env->syscall_string(), js_syscall);
948945
if (!js_path.IsEmpty())

test/parallel/test-domain-implicit-fs.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ d.on('error', common.mustCall(function(er) {
3636
assert.ok(!er.domainEmitter);
3737
assert.strictEqual(er.code, 'ENOENT');
3838
assert.ok(/\bthis file does not exist\b/i.test(er.path));
39-
assert.strictEqual(typeof er.errno, 'number');
4039
}));
4140

4241

test/parallel/test-domain.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,10 @@ d.on('error', function(er) {
7777
assert.ok(!er.domainEmitter);
7878
assert.strictEqual(er.code, 'ENOENT');
7979
assert.strictEqual(er_path, 'this file does not exist');
80-
assert.strictEqual(typeof er.errno, 'number');
8180
break;
8281

8382
case
8483
"ENOENT: no such file or directory, open 'stream for nonexistent file'":
85-
assert.strictEqual(typeof er.errno, 'number');
8684
assert.strictEqual(er.code, 'ENOENT');
8785
assert.strictEqual(er_path, 'stream for nonexistent file');
8886
assert.strictEqual(er.domain, d);

0 commit comments

Comments
 (0)