net: check and throw on error for getsockname
This commit attempts fix a TODO in net.js: TODO(bnoordhuis) Check err and throw?
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
lib