summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/configuration/ConfigManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/configuration/ConfigManager.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/configuration/ConfigManager.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/configuration/ConfigManager.java b/src/main/java/net/tylermurphy/hideAndSeek/configuration/ConfigManager.java
index 78d5c6e..c844924 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/configuration/ConfigManager.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/configuration/ConfigManager.java
@@ -79,8 +79,10 @@ public class ConfigManager {
this.config = new YamlConfiguration();
try {
this.config.load(reader);
- } catch(InvalidConfigurationException | IOException e){
+ } catch(InvalidConfigurationException e){
throw new RuntimeException("Invalid configuration in config file: "+file.getPath());
+ } catch(IOException e){
+ throw new RuntimeException("Could not access file: "+file.getPath());
}
InputStream input = this.getClass().getClassLoader().getResourceAsStream(defaultFilename);
@@ -91,8 +93,10 @@ public class ConfigManager {
this.defaultConfig = new YamlConfiguration();
try {
this.defaultConfig.load(default_reader);
- } catch(InvalidConfigurationException | IOException e){
+ } catch(InvalidConfigurationException e){
throw new RuntimeException("Invalid configuration in config file: "+file.getPath());
+ } catch(IOException e){
+ throw new RuntimeException("Could not access file: "+file.getPath());
}
try{