// search from file
InputStream inputStream = searchFromFile(path);
// if not found, throw exception
if (inputStream == null) {
throw new ConfigurationException("path " + path + " couldn't be found");
}
try {
load(inputStream);
} catch (Exception e) {
log.error("Exception loading configuration: " + e.getMessage(), e);
throw new ConfigurationException(e);
}
}