Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

os: throw when os.networkInterfaces() fails

  • Loading branch information...
commit 03b00dcca912ae2dba515fb05221f2245e829479 1 parent 51d5655
@piscisaureus piscisaureus authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/node_os.cc
View
7 src/node_os.cc
@@ -206,9 +206,8 @@ static Handle<Value> GetInterfaceAddresses(const Arguments& args) {
uv_err_t err = uv_interface_addresses(&interfaces, &count);
- if (err.code != UV_OK) {
- return Undefined();
- }
+ if (err.code != UV_OK)
+ return ThrowException(UVException(err.code, "uv_interface_addresses"));
ret = Object::New();
@@ -236,7 +235,7 @@ static Handle<Value> GetInterfaceAddresses(const Arguments& args) {
o->Set(String::New("address"), String::New(ip));
o->Set(String::New("family"), family);
o->Set(String::New("internal"), interfaces[i].is_internal ?
- True() : False());
+ True() : False());
ifarr->Set(ifarr->Length(), o);
}
Please sign in to comment.
Something went wrong with that request. Please try again.