try {
return Enum.valueOf(ConfigurationMode.class, modeName);
} catch (Exception exception) {
- //do nothing
+ LOGGER.debug("Configuration mode for merge strategy '{}' not found", modeName, exception);
}
}
}
throw new ConfigurationException(CONFIGURATION_TYPE_NOT_SUPPORTED + configType);
}
} catch (ConfigurationException exception) {
- exception.printStackTrace();
+ LOGGER.error("Error reading configuration at {}.", url.toString(), exception);
}
return Optional.empty();
try {
configurationMode = ConfigurationMode.valueOf(configMode);
} catch (Exception exception) {
- LOGGER.error("Could not find convert {} into configuration mode", configMode);
+ LOGGER.error("Could not find convert {} into configuration mode.", configMode, exception);
}
return Optional.ofNullable(configurationMode);
}
return IOUtils.toString(new URL(path), Charset.defaultCharset());
}
} catch (Exception exception) {
- exception.printStackTrace();
+ LOGGER.error("Error while getting '{}' content", path, exception);
}
return null;
}
return new String(Files.readAllBytes(path));
}
} catch (Exception exception) {
- exception.printStackTrace();
+ LOGGER.error("Error while getting '{}' content", path.toString(), exception);
}
return null;
}