Skip to content

Commit

Permalink
Merge 73b829c into 44818be
Browse files Browse the repository at this point in the history
  • Loading branch information
dmasyukov committed Jul 17, 2018
2 parents 44818be + 73b829c commit 1f65423
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/net/revelc/code/formatter/FormatterMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ private Map<String, String> getFormattingOptions(String newConfigFile) throws Mo
/**
* Read config file and return the config as {@link Map}.
*
* @return the options from config file or null if not config file found
* @return the options from config file
* @throws MojoExecutionException
* the mojo execution exception
*/
Expand All @@ -701,8 +701,7 @@ private Map<String, String> getOptionsFromConfigFile(String newConfigFile) throw
try (InputStream configInput = this.resourceManager.getResourceAsInputStream(newConfigFile)) {
return new ConfigReader().read(configInput);
} catch (ResourceNotFoundException e) {
getLog().debug("Config file [" + newConfigFile + "] cannot be found", e);
return new HashMap<>();
throw new MojoExecutionException("Cannot find config file [" + newConfigFile + "]");
} catch (IOException e) {
throw new MojoExecutionException("Cannot read config file [" + newConfigFile + "]", e);
} catch (SAXException e) {
Expand Down

0 comments on commit 1f65423

Please sign in to comment.