<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Freemarker exceptions</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111808266" />
  <subtitle>Freemarker exceptions</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111808266</id>
  <updated>2026-04-07T12:31:43Z</updated>
  <dc:date>2026-04-07T12:31:43Z</dc:date>
  <entry>
    <title>RE: Freemarker exceptions</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111808649" />
    <author>
      <name>Vishal Munjani</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111808649</id>
    <updated>2018-12-14T05:31:14Z</updated>
    <published>2018-12-14T05:31:14Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can use below code to handle exception in freemarker.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;&amp;amp;lt;#attempt&amp;amp;gt;
  &amp;lt;em&amp;gt;attempt block&amp;lt;/em&amp;gt;
&amp;amp;lt;#recover&amp;amp;gt;
  &amp;lt;em&amp;gt;recover block&amp;lt;/em&amp;gt;
&amp;amp;lt;/#attempt&amp;amp;gt;&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;For more you can refer &lt;a href="https://freemarker.apache.org/docs/ref_directive_attempt.html"&gt;https://freemarker.apache.org/docs/ref_directive_attempt.html&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Vishal Munjani</dc:creator>
    <dc:date>2018-12-14T05:31:14Z</dc:date>
  </entry>
  <entry>
    <title>Freemarker exceptions</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111808265" />
    <author>
      <name>Joaquin Cabal</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111808265</id>
    <updated>2018-12-14T00:12:37Z</updated>
    <published>2018-12-14T00:12:37Z</published>
    <summary type="html">&lt;p&gt;Hi, anyone knows if is possible catch any freemarker exception? &lt;/p&gt;
&lt;p&gt;For example A simple NullPointerException. Only to show an error
  message and no the exception stack trace in the view.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;</summary>
    <dc:creator>Joaquin Cabal</dc:creator>
    <dc:date>2018-12-14T00:12:37Z</dc:date>
  </entry>
</feed>
