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

Let InvalidReferenceException contain x.toString() of x.missing

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.3.26-incubating
    • None
    • engine
    • None

    Description

      It would be quite useful if the following contained techTag.toString():

      FreeMarker template error (DEBUG mode; use RETHROW in production!):
      The following has evaluated to null or missing:
      ==> techTag.title [in template "reports/templates/techReport-boxes.ftl" at line 133, column 59]

      Java stack trace (for programmers):


      freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
      at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
      at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:465)

      Now as it doesn't, I need to write a logging line, rebuild the project, and run again. Or debug. Neither is quick So this would save quite some time in development cycle.

      Thanks for considering.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pekarna Ondra Žižka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: