public class CrafterTemplateExceptionHandler extends Object implements freemarker.template.TemplateExceptionHandler
TemplateExceptionHandler that instead of printing the errors directly in the HTML and stopping template processing, stores
them in a model variable so they can be displayed later.| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR_FORMAT |
| Constructor and Description |
|---|
CrafterTemplateExceptionHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createErrorId() |
protected String |
getExceptionStackTrace(freemarker.template.TemplateException te) |
void |
handleTemplateException(freemarker.template.TemplateException te,
freemarker.core.Environment env,
Writer out) |
void |
setDisplayTemplateExceptionsInView(boolean displayTemplateExceptionsInView) |
public static final String ERROR_FORMAT
public void setDisplayTemplateExceptionsInView(boolean displayTemplateExceptionsInView)
public void handleTemplateException(freemarker.template.TemplateException te,
freemarker.core.Environment env,
Writer out)
throws freemarker.template.TemplateException
handleTemplateException in interface freemarker.template.TemplateExceptionHandlerfreemarker.template.TemplateExceptionprotected String getExceptionStackTrace(freemarker.template.TemplateException te)
protected String createErrorId()
Copyright © 2014 CrafterCMS. All Rights Reserved.