mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 09:08:01 +01:00
Ensure user data deserialization exceptions include file name
More than just a SerializationException can happen I guess
This commit is contained in:
parent
60129594a6
commit
f84a311c2b
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user