Added more descriptive LOG.error msg for a missing freemarker template

WW-2615


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@651537 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeromy Evans
2008-04-25 08:40:10 +00:00
parent ed3b8e5a68
commit 62e0acd2e5
@@ -127,7 +127,18 @@ public class FreemarkerTemplateEngine extends BaseTemplateEngine {
}
if (template == null) {
LOG.error("Could not load template " + templateContext.getTemplate());
if (LOG.isErrorEnabled()) {
LOG.error("Could not load the FreeMarker template named '" + templateContext.getTemplate().getName() +"':");
for (Template t : templates) {
LOG.error("Attempted: " + getFinalTemplateName(t));
}
LOG.error("The TemplateLoader provided by the FreeMarker Configuration was a: "+config.getTemplateLoader().getClass().getName());
if (freemarkerCaching) {
LOG.error("FreeMarker Template caching is enabled ("+StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE+"=true) and this template is now cached as missing (the TemplateLoader won't be asked again)");
} else {
LOG.error("FreeMarker Template caching is disabled ("+StrutsConstants.STRUTS_FREEMARKER_TEMPLATES_CACHE+"=false)");
}
}
if (exception != null) {
throw exception;
} else {