mirror of https://github.com/nodejs/node.git
Expose errno with a string for dns/cares
This is to mirror the behavior introduced in
aa95e5708f
.
Closes GH-727.
v0.7.4-release
parent
d664bf376d
commit
0304f1fc22
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue