1
0
Fork 0
forked from svrjs/svrjs

Replace code invoke the start() function with one with error handler

This commit is contained in:
Dorian Niemiec 2024-08-26 06:35:25 +02:00
parent 83418dbb10
commit 1f043d774a

View file

@ -2253,4 +2253,14 @@ if (cluster.isPrimary || cluster.isPrimary === undefined) {
});
}
// Start SVR.JS!
try {
start(true);
} catch (err) {
serverconsole.locerrmessage("There was a problem starting SVR.JS!!!");
serverconsole.locerrmessage("Stack:");
serverconsole.locerrmessage(generateErrorStack(err));
setTimeout(function () {
process.exit(err.errno !== undefined ? err.errno : 1);
}, 10);
}