From 3dbb3cdb6abcc3916ed6fa02e08e4759fc09cc6a Mon Sep 17 00:00:00 2001 From: Joe Shaw Date: Mon, 27 Jun 2011 13:42:11 -0400 Subject: [PATCH] SendTo and SendMsg expect a buffer only, not a string; fix the error message. Closes #1239. --- src/node_net.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_net.cc b/src/node_net.cc index a0bda02035..22b4e2ab44 100644 --- a/src/node_net.cc +++ b/src/node_net.cc @@ -1041,7 +1041,7 @@ static Handle SendMsg(const Arguments& args) { // Grab the actul data to be written, stuffing it into iov if (!Buffer::HasInstance(args[1])) { return ThrowException(Exception::TypeError( - String::New("Expected either a string or a buffer"))); + String::New("Expected a buffer"))); } Local buffer_obj = args[1]->ToObject(); @@ -1167,7 +1167,7 @@ static Handle SendTo(const Arguments& args) { // Grab the actul data to be written if (!Buffer::HasInstance(args[1])) { return ThrowException(Exception::TypeError( - String::New("Expected either a string or a buffer"))); + String::New("Expected a buffer"))); } Local buffer_obj = args[1]->ToObject();