Skip to content

Commit 44161ec

Browse files
committed
net: fix server.listen error message
Previously the error messages are mostly `[object Object]` after the options get normalized. Use util.inspect to make it more useful.
1 parent 53f3869 commit 44161ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/net.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ Server.prototype.listen = function() {
14161416
return this;
14171417
}
14181418

1419-
throw new Error('Invalid listen argument: ' + options);
1419+
throw new Error('Invalid listen argument: ' + util.inspect(options));
14201420
};
14211421

14221422
function lookupAndListen(self, port, address, backlog, exclusive) {

0 commit comments

Comments
 (0)