Ensure user data deserialization exceptions include file name

More than just a SerializationException can happen I guess
This commit is contained in:
Josh Roy 2023-07-22 16:32:55 -04:00 committed by MD
parent 60129594a6
commit f84a311c2b

View File

@ -17,7 +17,6 @@ import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.spongepowered.configurate.serialize.SerializationException;
import java.io.File;
import java.math.BigDecimal;
@ -83,7 +82,7 @@ public abstract class UserData extends PlayerExtension implements IConf {
config.load();
try {
holder = config.getRootNode().get(UserConfigHolder.class);
} catch (SerializationException e) {
} catch (Throwable e) {
ess.getLogger().log(Level.SEVERE, "Error while reading user config: " + config.getFile().getName(), e);
throw new RuntimeException(e);
}