mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 16:23:12 +09:00
Handle errors during master startup
Print a message urging unhandled exceptions thrown by startup to be reported to the GitHub issue tracker and initiate shutdown.
This commit is contained in:
1 parent
7dcd46a99a
commit
ed54db0db9
2 files changed
+9
-1
No files matched your search
@@ -3,6 +3,7 @@ Version 2.0.0
|
|||||||
|
|
||||||
- Fixed sslCert and sslPrivKey entries being ignored in the config.
|
- Fixed sslCert and sslPrivKey entries being ignored in the config.
|
||||||
- Changed ssl key creation to be done at startup instead of on npm install.
|
- Changed ssl key creation to be done at startup instead of on npm install.
|
||||||
|
- Added error handling during master startup.
|
||||||
|
|
||||||
Breaking Changes
|
Breaking Changes
|
||||||
----------------
|
----------------
|
||||||
|
|||||||
@@ -1042,5 +1042,12 @@ async function startServer() {
|
|||||||
module.exports = app;
|
module.exports = app;
|
||||||
|
|
||||||
if (module === require.main) {
|
if (module === require.main) {
|
||||||
startServer();
|
startServer().catch(err => {
|
||||||
|
console.error(
|
||||||
|
"Unexpected error occured while starting master, please report\n"+
|
||||||
|
"it to https://github.com/clusterio/factorioClusterio/issues"
|
||||||
|
);
|
||||||
|
console.error(err);
|
||||||
|
return shutdown();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user