Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: remove TODO about uv errno removal #12536

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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: #4641
  • Loading branch information
danbev committed Apr 20, 2017
commit fe0b8d9eebbd9c451e417a144abbe664a0970e68
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