Improve error handling in SpringBootPlugin

Closes gh-32677
pull/32747/head
Andy Wilkinson 2 years ago
parent 907396021f
commit 215eb96355

@ -130,12 +130,15 @@ public class SpringBootPlugin implements Plugin<Project> {
private void withPluginClassOfAction(PluginApplicationAction action, private void withPluginClassOfAction(PluginApplicationAction action,
Consumer<Class<? extends Plugin<? extends Project>>> consumer) { Consumer<Class<? extends Plugin<? extends Project>>> consumer) {
Class<? extends Plugin<? extends Project>> pluginClass;
try { try {
consumer.accept(action.getPluginClass()); pluginClass = action.getPluginClass();
} }
catch (Throwable ex) { catch (Throwable ex) {
// Plugin class unavailable. Continue. // Plugin class unavailable.
return;
} }
consumer.accept(pluginClass);
} }
} }

Loading…
Cancel
Save