fix: Catch IllegalStateException on invalid configuration load
This commit is contained in:
parent
14f38046e7
commit
609a02e3d8
@ -91,9 +91,12 @@ public class AuthMeVelocityPlugin {
|
|||||||
|
|
||||||
return new Toml().read(Files.newInputStream(configPath));
|
return new Toml().read(Files.newInputStream(configPath));
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
logger.info("An error ocurred on configuration initialization", ex);
|
logger.error("An error ocurred on configuration initialization", ex);
|
||||||
return null;
|
return null;
|
||||||
}
|
} catch(IllegalStateException ex) {
|
||||||
|
logger.error("Invalid configuration provided", ex);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean reload() {
|
public boolean reload() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user