#2254: Explicitly note config issues are not bugs

This commit is contained in:
md_5 2017-10-26 21:18:16 +11:00
parent ec4279eeb4
commit 9a7bf0a361

View File

@ -27,6 +27,7 @@ import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.util.CaseInsensitiveMap;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.error.YAMLException;
public class YamlConfig implements ConfigurationAdapter
{
@ -60,7 +61,13 @@ public class YamlConfig implements ConfigurationAdapter
try ( InputStream is = new FileInputStream( file ) )
{
config = (Map) yaml.load( is );
try
{
config = (Map) yaml.load( is );
} catch ( YAMLException ex )
{
throw new RuntimeException( "Invalid configuration encountered - this is a configuration error and NOT a bug! Please attempt to fix the error or see https://www.spigotmc.org/ for help.", ex );
}
}
if ( config == null )