Skip to content
Snippets Groups Projects
Commit 2e9f58be authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Throw a more helpful exception when no nameservers specified/available

My /etc/resolv.conf was wiped by Network Manager (gee, thanks), so
ircd.js was throwing the following unhelpful exceptions when starting
up:
Feb 25 13:47:51 git jsexec[19108]: !JavaScript : uncaught exception: Unable to create any sockets
Feb 25 13:47:51 git jsexec[19108]: !JavaScript : uncaught exception: Unable to create any sockets

First, instead of throwing a string, throw an Error object so we can
actually know where the exception ocurred. Please, everyone, throw Errors
not Strings.

Second, throw a different more helpful exception if there are no nameservers
specified in the DNS constructor or configured on the system.
parent e4b2d1f7
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment