From fe0b8d9eebbd9c451e417a144abbe664a0970e68 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 20 Apr 2017 14:39:06 +0200 Subject: [PATCH] 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: https://github.com/nodejs/node/issues/4641 --- src/node.cc | 3 --- test/parallel/test-domain-implicit-fs.js | 1 - test/parallel/test-domain.js | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/node.cc b/src/node.cc index 4913147619e8a6..e10a423767610f 100644 --- a/src/node.cc +++ b/src/node.cc @@ -940,9 +940,6 @@ Local UVException(Isolate* isolate, Local 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()) diff --git a/test/parallel/test-domain-implicit-fs.js b/test/parallel/test-domain-implicit-fs.js index 6e4127763ce51c..ff35e2eb354be7 100644 --- a/test/parallel/test-domain-implicit-fs.js +++ b/test/parallel/test-domain-implicit-fs.js @@ -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'); })); diff --git a/test/parallel/test-domain.js b/test/parallel/test-domain.js index fad71b0427b42e..0be8411ae61493 100644 --- a/test/parallel/test-domain.js +++ b/test/parallel/test-domain.js @@ -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);