Fix config BigDecimal parsing returning null on error (#5373)

Also add some more exception logging for parse issues.
This commit is contained in:
Josh Roy 2023-05-31 19:46:19 -04:00 committed by GitHub
parent 0d322e2c6b
commit cdd277da92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -131,6 +131,7 @@ public class EssentialsConfiguration {
try {
return node.get(LazyLocation.class);
} catch (SerializationException e) {
Essentials.getWrappedLogger().log(Level.SEVERE, e.getMessage(), e);
return null;
}
}
@ -272,7 +273,8 @@ public class EssentialsConfiguration {
try {
return node.get(BigDecimal.class);
} catch (SerializationException e) {
return null;
Essentials.getWrappedLogger().log(Level.SEVERE, e.getMessage(), e);
return def;
}
}