From 699e3994dfc25e5157d38a3ce02a6370dc276bd7 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 16 Dec 2020 20:30:17 +0100 Subject: [PATCH] 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. --- packages/slave/slave.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/slave/slave.js b/packages/slave/slave.js index b717228e..350ba6a7 100755 --- a/packages/slave/slave.js +++ b/packages/slave/slave.js @@ -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(` +--------------------------------------------------------------+