Skip to content

Commit

Permalink
fix: add exception catch
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 committed Feb 29, 2024
1 parent c828aaa commit b5945a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/net/guizhanss/fastmachines/FastMachines.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ public void enable() {
log(Level.INFO, "Loading language...");
String lang = config.getString("lang", DEFAULT_LANG);
localization = new LocalizationService(this, getFile());
localization.addLanguage(lang);
try {
localization.addLanguage(lang);
} catch (Exception e) {
log(Level.SEVERE, "An error has occurred while loading language " + lang);
}
if (!lang.equals(DEFAULT_LANG)) {
localization.addLanguage(DEFAULT_LANG);
}
Expand Down

0 comments on commit b5945a0

Please sign in to comment.