freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject incubator-freemarker git commit: FREEMARKER-71: When using exp?eval, if the expression inside evaluated string throws an exception, the cause exception of that exception was lost.
Date Sat, 16 Sep 2017 13:27:21 GMT
Repository: incubator-freemarker
Updated Branches:
  refs/heads/2.3-gae 3cf422347 -> 3aa6c5098


FREEMARKER-71: When using exp?eval, if the expression inside evaluated string throws an exception,
the cause exception of that exception was lost.


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/3aa6c509
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/3aa6c509
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/3aa6c509

Branch: refs/heads/2.3-gae
Commit: 3aa6c5098f9d6a1ac14da45edc6b7e6676700847
Parents: 3cf4223
Author: ddekany <ddekany@apache.org>
Authored: Sat Sep 16 15:26:52 2017 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Sat Sep 16 15:26:52 2017 +0200

----------------------------------------------------------------------
 src/main/java/freemarker/core/BuiltInsForStringsMisc.java | 2 +-
 src/manual/en_US/book.xml                                 | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/3aa6c509/src/main/java/freemarker/core/BuiltInsForStringsMisc.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/core/BuiltInsForStringsMisc.java b/src/main/java/freemarker/core/BuiltInsForStringsMisc.java
index eeeb270..4073235 100644
--- a/src/main/java/freemarker/core/BuiltInsForStringsMisc.java
+++ b/src/main/java/freemarker/core/BuiltInsForStringsMisc.java
@@ -97,7 +97,7 @@ class BuiltInsForStringsMisc {
             try {
                 return exp.eval(env);
             } catch (TemplateException e) {
-                throw new _MiscTemplateException(this, env,
+                throw new _MiscTemplateException(e, this, env,
                         "Failed to \"?", key, "\" string with this error:\n\n",
                         MessageUtil.EMBEDDED_MESSAGE_BEGIN,
                         new _DelayedGetMessageWithoutStackTop(e),

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/3aa6c509/src/manual/en_US/book.xml
----------------------------------------------------------------------
diff --git a/src/manual/en_US/book.xml b/src/manual/en_US/book.xml
index 809822b..e127a79 100644
--- a/src/manual/en_US/book.xml
+++ b/src/manual/en_US/book.xml
@@ -26943,6 +26943,15 @@ TemplateModel x = env.getVariable("x");  // get variable x</programlisting>
               the <literal>switch</literal> tag and the first
               <literal>case</literal> tag.</para>
             </listitem>
+
+            <listitem>
+              <para>Bug fixed (<link
+              xlink:href="https://issues.apache.org/jira/browse/FREEMARKER-71">FREEMARKER-71</link>):
+              When using
+              <literal><replaceable>exp</replaceable>?eval</literal>,
if the
+              expression inside evaluated string throws an exception, the
+              cause exception of that exception was lost.</para>
+            </listitem>
           </itemizedlist>
         </section>
 


Mime
View raw message