Wrap plugins in exception, better than having recaf hard-crash when loading invalid plugins
@@ -123,7 +123,6 @@ public class Plugins extends PluginManager {
//@formatter:off
static {
-
// create directory if it does not exist
if (!PLUGIN_DIR.exists()) {
PLUGIN_DIR.mkdir();
@@ -135,8 +134,12 @@ public class Plugins extends PluginManager {
(strategy, directory) -> {
return new Plugins(strategy, directory);
});
+ try {
// load the plugins
INSTANCE.loadPlugins();
+ } catch (Exception e) {
+ Logging.error(e);
+ }
}
//@formatter:on
}
