PluginData related error message clarification

This commit is contained in:
Rsl1122 2019-03-03 18:59:27 +02:00
parent 1c4938a3db
commit 016e1dc4bc
2 changed files with 8 additions and 5 deletions

View File

@ -125,8 +125,9 @@ public class HookHandler implements SubSystem {
containers.put(pluginData, container);
}
} catch (Exception | NoClassDefFoundError | NoSuchFieldError | NoSuchMethodError e) {
String sourcePlugin = pluginData.getSourcePlugin();
logger.error("PluginData caused exception: " + sourcePlugin);
String pluginName = pluginData.getSourcePlugin();
logger.error("PluginData caused exception: " + pluginName +
", you can disable the integration under 'Plugins." + pluginName + ".Enabled'");
errorHandler.log(L.WARN, pluginData.getClass(), e);
}
}

View File

@ -140,8 +140,9 @@ public class AnalysisPluginsTabContentCreator {
List<PluginData> sources = hookHandler.getAdditionalDataSources();
sources.parallelStream().forEach(source -> {
String pluginName = source.getSourcePlugin();
try {
timings.start("Source " + source.getSourcePlugin());
timings.start("Source " + pluginName);
source.setAnalysisData(analysisContainer);
AnalysisContainer container = source.getServerData(uuids, new AnalysisContainer());
@ -150,10 +151,11 @@ public class AnalysisPluginsTabContentCreator {
}
} catch (Exception | NoClassDefFoundError | NoSuchFieldError | NoSuchMethodError e) {
logger.error("A PluginData-source caused an exception: " + source.getSourcePlugin());
logger.error("A PluginData-source caused an exception: " + pluginName +
", you can disable the integration under 'Plugins." + pluginName + ".Enabled'");
errorHandler.log(L.WARN, this.getClass(), e);
} finally {
timings.end(DebugChannels.ANALYSIS, "Source " + source.getSourcePlugin());
timings.end(DebugChannels.ANALYSIS, "Source " + pluginName);
source.setAnalysisData(null);
}
});