mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 16:23:12 +09:00
Expect error loading configs (#388)
Rethrow error loading configs as StartupError as these are most likely a result of user error.
This commit is contained in:
1 parent
ddaaf15b2e
commit
31f1099dc0
3 files changed
+11
-3
No files matched your search
+1
-1
@@ -1082,7 +1082,7 @@ async function startControl() {
|
|||||||
await controlConfig.init();
|
await controlConfig.init();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw err;
|
throw new libErrors.StartupError(`Failed to load ${args.config}: ${err.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ async function initialize() {
|
|||||||
await parameters.masterConfig.init();
|
await parameters.masterConfig.init();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw err;
|
throw new libErrors.StartupError(`Failed to load ${parameters.masterConfigPath}: ${err.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1777,7 +1777,7 @@ async function startSlave() {
|
|||||||
await slaveConfig.init();
|
await slaveConfig.init();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw err;
|
throw new libErrors.StartupError(`Failed to load ${args.config}: ${err.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1887,6 +1887,14 @@ I version of clusterio. Expect things to break. I
|
|||||||
if (err instanceof libErrors.AuthenticationFailed) {
|
if (err instanceof libErrors.AuthenticationFailed) {
|
||||||
logger.fatal(err.message);
|
logger.fatal(err.message);
|
||||||
|
|
||||||
|
} else if (err instanceof libErrors.StartupError) {
|
||||||
|
logger.fatal(`
|
||||||
|
+-----------------------------------+
|
||||||
|
| Unable to to start clusterioslave |
|
||||||
|
+-----------------------------------+
|
||||||
|
${err.stack}`
|
||||||
|
);
|
||||||
|
|
||||||
} else if (err instanceof libErrors.PluginError) {
|
} else if (err instanceof libErrors.PluginError) {
|
||||||
logger.fatal(`
|
logger.fatal(`
|
||||||
${err.pluginName} plugin threw an unexpected error
|
${err.pluginName} plugin threw an unexpected error
|
||||||
|
|||||||
Reference in new issue
Block a user