Add missing plugin error printing in slave.js

Special case PluginError printing during startup in slave.js in the same
way it's done in master.js.  This makes it so that the stack of the
error thrown by a plugin is printed instead of the stack trace of the
place it was wrapped into a PluginError.
This commit is contained in:
Hornwitser committed 2020-12-28 07:03:32 +01:00
1 parent b681ea7243
commit 699e3994df
1 file changed
+8
+8
View File
@@ -1647,6 +1647,14 @@ I version of clusterio. Expect things to break. I
if (err instanceof libErrors.AuthenticationFailed) {
logger.fatal(err.message);
} else if (err instanceof libErrors.PluginError) {
logger.fatal(`
${err.pluginName} plugin threw an unexpected error
during startup, please report it to the plugin author.
------------------------------------------------------
${err.original.stack}`
);
} else {
logger.fatal(`
+--------------------------------------------------------------+