} catch (Exception e) {
log.error("Failed to load velocity template from " + template, e);
}
}
if (template == null && !loadErrorTemplate) {
throw new CRException(new CRError("ERROR", "The template " + template + " cannot be found."));
}
if (errorTemplate == null && loadErrorTemplate) {
throw new CRException(new CRError("ERROR", "The template " + template + " cannot be found."));
}
}