Expose errno with a string for dns/cares

This is to mirror the behavior introduced in
aa95e5708f.

Closes GH-727.
pull/22966/head
Felix Geisendörfer 2011-02-25 10:27:52 +01:00 committed by Ryan Dahl
parent d664bf376d
commit 0304f1fc22
2 changed files with 2 additions and 0 deletions

View File

@ -216,6 +216,7 @@ static void ResolveError(Persistent<Function> &cb, int status) {
Local<Object> obj = e->ToObject();
obj->Set(String::NewSymbol("errno"), Integer::New(status));
obj->Set(String::NewSymbol("code"), code);
TryCatch try_catch;

View File

@ -24,6 +24,7 @@ function httpreq(count) {
req.on('error', function(e){
console.log(e.message);
assert.strictEqual(e.code, 'ENOTFOUND');
hadError++
httpreq(count + 1)
})