Skip to content

Commit

Permalink
src: remove uv errno
Browse files Browse the repository at this point in the history
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
  • Loading branch information
danbev committed Apr 20, 2017
1 parent f3f9dd7 commit fe0b8d9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -940,9 +940,6 @@ Local<Value> UVException(Isolate* isolate,

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

// TODO(piscisaureus) errno should probably go; the user has no way of
// knowing which uv errno value maps to which error.
e->Set(env->errno_string(), Integer::New(isolate, errorno));
e->Set(env->code_string(), js_code);
e->Set(env->syscall_string(), js_syscall);
if (!js_path.IsEmpty())
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-domain-implicit-fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ d.on('error', common.mustCall(function(er) {
assert.ok(!er.domainEmitter);
assert.strictEqual(er.code, 'ENOENT');
assert.ok(/\bthis file does not exist\b/i.test(er.path));
assert.strictEqual(typeof er.errno, 'number');
}));


Expand Down
2 changes: 0 additions & 2 deletions test/parallel/test-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,10 @@ d.on('error', function(er) {
assert.ok(!er.domainEmitter);
assert.strictEqual(er.code, 'ENOENT');
assert.strictEqual(er_path, 'this file does not exist');
assert.strictEqual(typeof er.errno, 'number');
break;

case
"ENOENT: no such file or directory, open 'stream for nonexistent file'":
assert.strictEqual(typeof er.errno, 'number');
assert.strictEqual(er.code, 'ENOENT');
assert.strictEqual(er_path, 'stream for nonexistent file');
assert.strictEqual(er.domain, d);
Expand Down

0 comments on commit fe0b8d9

Please sign in to comment.