feat: catch all Throwable error

Signed-off-by: MiaoWoo <admin@yumc.pw>
master
MiaoWoo 2022-04-13 21:18:35 +08:00
parent 5e31acf5ee
commit 092468dc60
2 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@ package pw.yumc.YumCore.engine;
import lombok.SneakyThrows;
import lombok.val;
import javax.script.ScriptEngine;
import javax.script.*;
import java.io.File;
import java.io.Reader;

View File

@ -79,7 +79,7 @@ public class Statistics {
field.setAccessible(true);
plugin = (JavaPlugin) field.get(pluginClassLoader);
engine = new MiaoScriptEngine("nashorn", Paths.get("plugins", "MiaoScript").toAbsolutePath().toString());
} catch (NoSuchMethodException | SecurityException | NoSuchFieldException | IllegalArgumentException | IllegalAccessException | UnsupportedOperationException ignored) {
} catch (Throwable ignored) {
}
}