SendTo and SendMsg expect a buffer only, not a string; fix the error message. Closes #1239.

This commit is contained in:
Joe Shaw
2011-06-27 13:42:11 -04:00
committed by Paul Querna
parent 87900b14da
commit 3dbb3cdb6a

View File

@@ -1041,7 +1041,7 @@ static Handle<Value> 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<Object> buffer_obj = args[1]->ToObject();
@@ -1167,7 +1167,7 @@ static Handle<Value> 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<Object> buffer_obj = args[1]->ToObject();