Commits

tm_jee  committed 29efdfe

- allow the hook protected boolean preTemplateProcess(Template template, TemplateModel model) to throw TemplateException as well. Cause TemplateException is not a RuntimeException and its being deal with at FreemarkerResult by allowing it to propagate up, henc subclass that overwrite this hook should not be forced to deal with TemplateException (when doing template.process(....) but should be give a change to let TemplateException propagate up, if they want to deal with it in the subclass it is still possible as they could override preTemplateProcess(...) without declaring TemplateException as a throwable exception.

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2831573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 83af24b

Comments (0)

Files changed (1)

File src/java/com/opensymphony/webwork/views/freemarker/FreemarkerResult.java

      *
      * @return true to process the template, false to suppress template processing.
      */
-    protected boolean preTemplateProcess(Template template, TemplateModel model) throws IOException {
+    protected boolean preTemplateProcess(Template template, TemplateModel model) throws IOException, TemplateException {
         Object attrContentType = template.getCustomAttribute("content_type");
 
         if (attrContentType != null) {