Use a lower level exception in BukkitWorldConfiguration to get a printout when more severe YAML issues occur

This commit is contained in:
Matthew Miller 2020-08-16 16:55:19 +10:00
parent c1ff4fc3d3
commit 5b8c3e7f70

View File

@ -40,7 +40,7 @@
import com.sk89q.worldguard.commands.CommandUtils;
import com.sk89q.worldguard.config.YamlWorldConfiguration;
import org.bukkit.potion.PotionEffectType;
import org.yaml.snakeyaml.parser.ParserException;
import org.yaml.snakeyaml.error.YAMLException;
import java.io.File;
import java.io.FileNotFoundException;
@ -135,7 +135,7 @@ public void loadConfiguration() {
config.load();
} catch (IOException e) {
log.log(Level.SEVERE, "Error reading configuration for world " + worldName + ": ", e);
} catch (ParserException e) {
} catch (YAMLException e) {
log.severe("Error parsing configuration for world " + worldName + ". ");
throw e;
}