From 609a02e3d8d18b5ab7a5e9c85312407ff962f0bb Mon Sep 17 00:00:00 2001 From: 4drian3d Date: Wed, 27 Jul 2022 16:58:30 +0000 Subject: [PATCH] fix: Catch IllegalStateException on invalid configuration load --- .../glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java b/proxy/src/main/java/com/glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java index 4c6c6ad..a4ddc1e 100644 --- a/proxy/src/main/java/com/glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java +++ b/proxy/src/main/java/com/glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java @@ -91,9 +91,12 @@ public class AuthMeVelocityPlugin { return new Toml().read(Files.newInputStream(configPath)); } catch (IOException ex) { - logger.info("An error ocurred on configuration initialization", ex); + logger.error("An error ocurred on configuration initialization", ex); return null; - } + } catch(IllegalStateException ex) { + logger.error("Invalid configuration provided", ex); + return null; + } } public boolean reload() {