* @throws AugeasTreeException if the specified module wasn't configured or if there was some error loading
* the tree.
*/
public AugeasTree getAugeasTree(String moduleName, boolean lazy) throws AugeasTreeException {
if (!modules.contains(moduleName))
throw new AugeasTreeException("Augeas Module " + moduleName + " not found.");
try {
if (augeas == null)
load();
} catch (Exception e) {
throw new AugeasTreeException("Loading of augeas failed");
}
AugeasTree tree;
try {
tree = augeasTreeBuilder.buildTree(this, config, moduleName, lazy);
} catch (Exception e) {
throw new AugeasTreeException("Error building Augeas tree.", e);
}
return tree;
}