Provide proper error message in case the (default) property file is not available. Ran into this issue in combination with the Gradle daemon.

This commit is contained in:
Stefan Neuhaus
2016-10-08 20:00:43 +02:00
parent d9c4480627
commit 5a939ec108

View File

@@ -370,8 +370,11 @@ public final class Settings {
try {
in = this.getClass().getClassLoader().getResourceAsStream(propertiesFilePath);
props.load(in);
} catch (NullPointerException ex) {
LOGGER.error("Did not find settings file '{}'.", propertiesFilePath);
LOGGER.debug("", ex);
} catch (IOException ex) {
LOGGER.error("Unable to load default settings.");
LOGGER.error("Unable to load settings from '{}'.", propertiesFilePath);
LOGGER.debug("", ex);
} finally {
if (in != null) {