forked from svrjs/svrjs
Replace code invoke the start() function with one with error handler
This commit is contained in:
parent
83418dbb10
commit
1f043d774a
1 changed files with 11 additions and 1 deletions
10
src/index.js
10
src/index.js
|
@ -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);
|
||||
}
|
Reference in a new issue