summaryrefslogtreewikicommitdiff
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2022-05-06 07:33:48 -0400
committerTyler Murphy <tylermurphy534@gmail.com>2022-05-06 07:33:48 -0400
commit651d0c5a544bf599176b0842411fbc3534ac78c4 (patch)
treea3a6e392c33d6adb810bce74dcedb456245a5238
parentutf8 finally working (diff)
downloadkenshinshideandseek-651d0c5a544bf599176b0842411fbc3534ac78c4.tar.gz
kenshinshideandseek-651d0c5a544bf599176b0842411fbc3534ac78c4.tar.bz2
kenshinshideandseek-651d0c5a544bf599176b0842411fbc3534ac78c4.zip
split catch block in config manager
-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{