Class CrafterTemplateExceptionHandler

java.lang.Object
org.craftercms.engine.freemarker.CrafterTemplateExceptionHandler
All Implemented Interfaces:
freemarker.template.TemplateExceptionHandler

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.
Author:
Alfonso Vásquez
  • Field Details

  • Constructor Details

    • CrafterTemplateExceptionHandler

      public CrafterTemplateExceptionHandler(boolean displayTemplateExceptionsInView)
  • Method Details

    • handleTemplateException

      public void handleTemplateException(freemarker.template.TemplateException te, freemarker.core.Environment env, Writer out) throws freemarker.template.TemplateException
      Specified by:
      handleTemplateException in interface freemarker.template.TemplateExceptionHandler
      Throws:
      freemarker.template.TemplateException
    • getExceptionStackTrace

      protected String getExceptionStackTrace(freemarker.template.TemplateException te)
    • createErrorId

      protected String createErrorId()