You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by "Vojtech Knyttl (JIRA)" <ji...@apache.org> on 2017/09/01 09:05:00 UTC

[jira] [Created] (FREEMARKER-71) Causing stacktrace gets completely lost

Vojtech Knyttl created FREEMARKER-71:
----------------------------------------

             Summary: Causing stacktrace gets completely lost
                 Key: FREEMARKER-71
                 URL: https://issues.apache.org/jira/browse/FREEMARKER-71
             Project: Apache Freemarker
          Issue Type: Bug
            Reporter: Vojtech Knyttl


When using eval and inner method throws exception, this exception gets completely lost and is not found in stack trace.

The problem is in method BuiltinsForStringsMisc.java (eg. https://www.programcreek.com/java-api-examples/index.php?source_dir=freemarker-old-master/src/main/java/freemarker/core/BuiltInsForStringsMisc.java):


{code:java}
           try { 
                return exp.eval(env); 
            } catch (TemplateException e) { 
                throw new _MiscTemplateException(this, env, 
                        "Failed to \"?", key, "\" string with this error:\n\n", 
                        MessageUtil.EMBEDDED_MESSAGE_BEGIN, 
                        new _DelayedGetMessageWithoutStackTop(e), 
                        MessageUtil.EMBEDDED_MESSAGE_END, 
                        "\n\nThe failing expression:"); 
            } 
{code}

The caught exception is not logged, nor passed to the new exception.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)