We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31ed37f commit 84277eaCopy full SHA for 84277ea
2 files changed
src/node_dns.cc
@@ -443,6 +443,11 @@ static Handle<Value> Reverse(const Arguments& args) {
443
String::New("Argument must be a string.")));
444
}
445
446
+ if (!args[1]->IsFunction()) {
447
+ return ThrowException(Exception::Error(
448
+ String::New("Missing callback argument")));
449
+ }
450
+
451
String::Utf8Value ip_address(args[0]->ToString());
452
453
union {
test/disabled/test-dns.js
@@ -8,7 +8,10 @@ var dns = require("dns"),
8
9
assert.throws(function () {
10
dns.resolve('google.com', 'A');
11
-})
+});
12
+assert.throws(function () {
13
+ dns.resolve('127.0.0.1', 'PTR');
14
15
16
17
var hosts = ['example.com', 'example.org',
0 commit comments