split catch block in config manager
This commit is contained in:
parent
50f3fc4b7c
commit
651d0c5a54
1 changed files with 6 additions and 2 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue