mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
SendTo and SendMsg expect a buffer only, not a string; fix the error message. Closes #1239.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user