mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-01-22 08:11:22 +01:00
Throw an exception if the announcements-file fails to load.
This makes errors in the announcements-file more visible, both during initial load and during reloads.
This commit is contained in:
parent
a834246cbd
commit
2404bb478d
@ -221,8 +221,10 @@ public class MobArena extends JavaPlugin
|
||||
yaml.load(file);
|
||||
ConfigUtils.addMissingRemoveObsolete(file, Msg.toYaml(), yaml);
|
||||
Msg.load(yaml);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("There was an error reading the announcements-file:\n" + e.getMessage());
|
||||
} catch (InvalidConfigurationException e) {
|
||||
throw new RuntimeException("\n\n>>>\n>>> There is an error in your announements-file! Handle it!\n>>> Here's what snakeyaml says:\n>>>\n\n" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user