• exec/load/dns.js

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sat Feb 25 15:01:54 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/2e9f58be866886dbe6d8ad10
    Modified Files:
    exec/load/dns.js
    Log Message:
    Throw a more helpful exception when no nameservers specified/availableMy /etc/resolv.conf was wiped by Network Manager (gee, thanks), soircd.js was throwing the following unhelpful exceptions when startingup:Feb 25 13:47:51 git jsexec[19108]: !JavaScript : uncaught exception: Unable to create any socketsFeb 25 13:47:51 git jsexec[19108]: !JavaScript : uncaught exception: Unable to create any socketsFirst, instead of throwing a string, throw an Error object so we canactually know where the exception ocurred. Please, everyone, throw Errorsnot Strings.Second, throw a different more helpful exception if there are no nameserversspecified in the DNS constructor or configured on the system.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)