Uploaded image for project: 'Apache Freemarker'
  1. Apache Freemarker
  2. FREEMARKER-71

Causing stacktrace gets completely lost

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.3.27-incubating
    • None
    • None

    Description

      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):

                 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:"); 
                  } 
      

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            knyttl Vojtech Knyttl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: