Skip to content

Commit

Permalink
fix: Catch IllegalStateException on invalid configuration load
Browse files Browse the repository at this point in the history
  • Loading branch information
4drian3d committed Jul 27, 2022
1 parent 14f3804 commit 609a02e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,12 @@ private Toml loadConfig(Path path){

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() {
Expand Down

0 comments on commit 609a02e

Please sign in to comment.