os: throw when os.networkInterfaces() fails
This commit is contained in:
parent
51d5655efa
commit
03b00dcca9
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user